Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with latest CocoaPods version 1.15.1: No such module 'MLKitVision' #953

Open
toebgen opened this issue Feb 6, 2024 · 7 comments

Comments

@toebgen
Copy link

toebgen commented Feb 6, 2024

When I try to build a clean Flutter app, created with flutter create (Flutter 3.16.9, channel stable), and add the mobile_scanner dependency to the pubspec.yaml: mobile_scanner: ^4.0.0, then 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-4.0.0/ios/Classes/MobileScanner.swift:10:7

Uncategorized (Xcode): Command SwiftCompile failed with a nonzero exit code

I have the latest CocoaPods version installed, which is 1.15.1 as of today.

The mobile_scanner does not seem to be compatible with this version.

@toebgen toebgen changed the title Incompatible with latest CocoaPods version: No such module 'MLKitVision' Incompatible with latest CocoaPods version 1.15.1: No such module 'MLKitVision' Feb 6, 2024
@fhuonder
Copy link

fhuonder commented Feb 6, 2024

I can confirm this behavior.
When building with version 1.11.3 of CocoaPods it works, when updating CocoaPods to vesion 1.15.1 the above error occurs.

Hint: when using 1.11.3 the replacmenet of DT_TOOLCHAIN_DIR with TOOLCHAIN_DIR must be done manually (see e.g. here CocoaPods/CocoaPods#12012 (comment))

@toebgen
Copy link
Author

toebgen commented Feb 6, 2024

In the related Stackoverflow issue someone has hinted to this: https://stackoverflow.com/a/77419102/19807154.
It recommends to

import the standalone libraries individually, rather than importing the main module as a whole

@MBilalMurtaZa
Copy link

Same issue I faced after updating cocapod at 1.15.1.

@SputNikPlop
Copy link

I believe there happened to be some regressions in 1.15.1 try updating to 1.15.2 and see if this happens.

@fhuonder
Copy link

fhuonder commented Feb 7, 2024

Works with 1.15.2

@launay12u
Copy link

Got the same error with pod 1.15.2

@SputNikPlop
Copy link

Got the same error with pod 1.15.2

May you share your flutter doctor? Also you could try flutter clean && flutter pub cache repair && flutter pub get and see if that fixes it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants