flutterfire
flutterfire copied to clipboard
Firebase Ml Vision - textRecognizer not recognizing text on ios.
The FirebaseVision.instance.textRecognizer() is not recognizing any text on iOS device. It works perfect on an android device.
To Reproduce Use FirebaseVision.instance.textRecognizer() on an image to try and recognize text.
void _read() {
progressDialog.show();
_takePicture().then((String filePath) async {
final FirebaseVisionImage visionImage =
FirebaseVisionImage.fromFilePath(filePath);
final TextRecognizer textRecognizer =
FirebaseVision.instance.textRecognizer();
textRecognizer.processImage(visionImage).then((visionText) {
print(visionText.text);
_processText(visionText.blocks);
textRecognizer.close();
}).catchError((error) {
progressDialog.dismiss();
PlatformErrorAlert(context: context, text: error).show();
});
}).catchError((error) {
progressDialog.dismiss();
PlatformErrorAlert(context: context, text: error).show();
});
}
The print(visionText.text); is empty when using an iOS device.
I expect it to return a VisionText with the recognized text like it does on an android device.
Flutter doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.15.23-pre.28, on Mac OS X 10.14.6 18G103, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[!] Android Studio (version 3.6)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.43.0)
[✓] Connected device (1 available)
! Doctor found issues in 1 category.
Hi @chaser79 I see there's an open issue addressing the case you described. Please follow up on that issue, I'm closing the current one as duplicate. If you disagree please write in the comments and I will reopen it. Thank you