When I try to build my Flutter (Flutter 3.16.9, channel stable) app I receive the above mentioned error:
Failed to build iOS app
Swift Compiler Error (Xcode): No such module 'MLKitVision'
/.pub-cache/hosted/pub.dev/mobile_scanner-3.5.7/ios/Classes/MobileScanner.swift:10:7
I have the latest CocoaPods version installed, which is 1.15.1
as of today.
My build steps are
flutter clean &&
flutter pub get &&
flutter pub run build_runner build --delete-conflicting-outputs &&
flutter run
as well as
cd ios/
rm -rf Podfile.lock &&
rm -rf Pods &&
pod repo update &&
pod cache clean --all &&
pod deintegrate &&
pod setup &&
pod install --repo-update
With these steps I could get through errors like this in the past, this seems to be different today, though.
Does anybody experience the same, or maybe has found a solution to this?
2
Answers
Same error for all external frameworks, like ZoomVideoSDK and TerraiOS. New cocoapods version cannot be used for Flutter pod installation if you have any external framework.
Hopefully it will be soon resolved.
CocoaPods 1.15.1 has broken many pods – https://github.com/CocoaPods/CocoaPods/issues
Until 1.15.2 is available, I recommend that you stay with version 1.14.3.