Skip to content

Unable to compile for iOS due to MLKit lib conflict #364

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

Closed
psatler opened this issue Nov 11, 2022 · 3 comments
Closed

Unable to compile for iOS due to MLKit lib conflict #364

psatler opened this issue Nov 11, 2022 · 3 comments
Labels
dependencies Pull requests that update a dependency file Firebase Issues related to using ML Kit along with Firabase

Comments

@psatler
Copy link

psatler commented Nov 11, 2022

Hi, thanks for the efforts on providing such packages for the community. It helps a lot!

Below is the issue I'm facing currently with some of your plugins and another one that I'm using.

I'm using the mobile scanner package, and both TextRecognition and translation packages.

When trying to compile the project for iOS, I'm facing the following problem:

[!] CocoaPods could not find compatible versions for pod "GoogleMLKit/MLKitCore":
  In Podfile:
    google_mlkit_text_recognition (from `.symlinks/plugins/google_mlkit_text_recognition/ios`) was resolved to 0.5.0, which depends on
      GoogleMLKit/TextRecognition (~> 3.2.0) was resolved to 3.2.0, which depends on
        GoogleMLKit/MLKitCore (= 3.2.0)

    mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) was resolved to 0.0.1, which depends on
      GoogleMLKit/BarcodeScanning (~> 2.6.0) was resolved to 2.6.0, which depends on
        GoogleMLKit/MLKitCore (= 2.6.0)

The Mobile Scanner package also uses MLKit and its dependencies are getting conflicts with the ones of the MLKit plugin. I also noticed this issue when using version of 0.4.0 of these plugins.

For now, I downgraded the dependencies to version 0.3.0 and I was able to compile successfully. Though, that is not the optimal solution for this.

google_mlkit_translation: ^0.3.0
google_mlkit_text_recognition: ^0.3.0

PS: One thing I noticed as well when looking at this commit is that you added an optional way to add new language packages. Though, by looking at the commit, it seems that the pod GoogleMLKit/TextRecognitionChinese was left there uncommented so maybe that is the reason of the pod versions conflict? I haven't had time to fork and check this myself yet, but I decided to open this issue already in case you can spot that easier than me.

@Kevinpahlevi
Copy link

im facing this issue too, any update for this problem ?

@phiyale
Copy link

phiyale commented Nov 26, 2022

Workaround:
#357 (comment)
thanks @jorgeroncero
Do not forget to edit Podfile
#357 (comment)
thanks @steven230500 @emileswain

The solution above works, confirmed few people(including me), any side effect not reported yet.

MLKit team also suggesting tweaking dependencies before MLKit release new pods
https://issuetracker.google.com/issues/254418199#comment56

Originally posted by @phiyale in #357 (comment)
#357

@psatler
Copy link
Author

psatler commented Nov 28, 2022

Hi,
I noticed that mobile_scanner got updated recently and because of that, I gave another go of using the latest dependencies of both mobile_scanner and the ML Kits ones I mentioned above (TextRecognition and translation). Just by upgrading those I got my conflict issue solved.

So, for me, the dependencies used and their versions, were:

mobile_scanner: ^2.1.0
...
google_mlkit_translation: ^0.5.0
google_mlkit_text_recognition: ^0.5.0

So, I will close this issue for now.

@psatler psatler closed this as completed Nov 28, 2022
@fbernaly fbernaly added dependencies Pull requests that update a dependency file Firebase Issues related to using ML Kit along with Firabase labels Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file Firebase Issues related to using ML Kit along with Firabase
Projects
None yet
Development

No branches or pull requests

4 participants