When add firebase_ml_vision: 0.3.0 to an existing project, when building xcode always complain about: Unknown type name 'FIRVisionCloudLabelDetector'.
The project can be compiled if firebase_ml_vision excluded.
Here is my flutter doctor result:
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel dev, v1.1.9, on Mac OS X 10.14.1 18B75, locale zh-Hans-CN) [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [✓] iOS toolchain - develop for iOS devices (Xcode 10.1) [✓] Android Studio (version 3.1) [✓] IntelliJ IDEA Ultimate Edition (version 2018.3.2) [✓] Connected device (1 available)
I tried to reinstall cocoapods and upgrade both flutter using 'flutter upgrade' and pods using 'cd ios && pod update', still doesn't work.
Solution 1: MeMTn
I had the same problem, a workaround would be to downgrade the
To do so open your project in xcode and open the
Podfile then add
pod 'Firebase/MLVisionLabelModel', '5.15.0'
and rerun. it should work fine.
Solution 2: Eradicatore
My pod file had the following areas changed and I was getting this same issue:
# Uncomment this line to define a global platform for your project platform :ios, '9.0' ... target 'Runner' do use_frameworks! ... pod 'GoogleAppMeasurement' pod 'Firebase/Core' pod 'Firebase/Messaging' pod 'Firebase/MLVisionBarcodeModel', '5.15.0' pod 'Firebase/MLVisionLabelModel', '5.15.0' pod 'Firebase/MLVisionTextModel', '5.15.0'
I changed all the 5.15.0 to 5.16.0, and did the command: 'pod update' and this issue went away. I also was playing games before a bit betweeen ios and androidX builds with pubspec.yaml. I had the following for androidX builds:
# Build for AndroidX #firebase_ml_vision: ^0.9.2 firebase_ml_vision: ^0.8.0 # Build for iOS #firebase_ml_vision: ^0.2.1 flutter_camera_ml_vision: ^2.2.1
and it worked. But then gave upgrade issues for iOS. So now once I went to 5.16.0 I'm able to JUST have the following line ONLY: