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

update BarcodeScanning dependency #619

Closed
wants to merge 1 commit into from

Conversation

ivofernandes
Copy link

Needed to update the dependency because I work on a project that uses google_mlkit_barcode_scanning and also mobile_scanner,

the problem was caused because they were using different versions of BarcodeScanning

https://github.com/flutter-ml/google_ml_kit_flutter/blob/develop/packages/google_mlkit_barcode_scanning/ios/google_mlkit_barcode_scanning.podspec#L18
https://github.com/juliansteenbakker/mobile_scanner/blob/master/ios/mobile_scanner.podspec#L18

And would return this error
[!] CocoaPods could not find compatible versions for pod "GoogleMLKit/BarcodeScanning":
In Podfile:
google_mlkit_barcode_scanning (from .symlinks/plugins/google_mlkit_barcode_scanning/ios) was resolved to 0.11.1, which depends on
GoogleMLKit/BarcodeScanning (~> 5.0.0)

mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) was resolved to 5.0.0, which depends on
  GoogleMLKit/BarcodeScanning (~> 6.0.0)

As this was the project that was lagging behind I decided to update and for me it worked

@fbernaly
Copy link
Collaborator

We already tried 6.0.0, look at this PR: #613 (comment)
and we had to revert it (#617) because 6.0.0 is still not available to the public. They have it in their sample app but when you run pod install or pod update this is what you get:

[!] CocoaPods could not find compatible versions for pod "GoogleMLKit/BarcodeScanning":
  In Podfile:
    google_mlkit_barcode_scanning (from `.symlinks/plugins/google_mlkit_barcode_scanning/ios`) was resolved to 0.11.1, which depends on
      GoogleMLKit/BarcodeScanning (~> 6.0.0)

None of your spec sources contain a spec satisfying the dependency: `GoogleMLKit/BarcodeScanning (~> 6.0.0)`.

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Please verify that 6.0.0 is available by compiling our example app and also update all other iOS plugin dependencies accordingly.

@ivofernandes
Copy link
Author

Okay I'm not sure what do you mean about "not available to the public"

My problem was that my project also uses mobile_scanner, and it uses the version 6, and looks like flutter can't support the 2 different versions, but anyway, I'm not fully aware of all the use cases this project support and is just used to extract a qr_code from an image in my use case, and in this branch it worked, so I can just leave the import that I'm using now

google_mlkit_barcode_scanning:
  git:
    url: https://github.com/ivofernandes/google_ml_kit_flutter.git
    path: packages/google_mlkit_barcode_scanning
    ref: afa3615ff6df768495cf73f37c6a4aa7c6dec49a

And about the mobile scanner, you can check here that they are using the same

s.dependency 'GoogleMLKit/BarcodeScanning', '~> 6.0.0'

https://github.com/juliansteenbakker/mobile_scanner/blob/master/ios/mobile_scanner.podspec#L18

So I don't get what is not available to the public

@fbernaly
Copy link
Collaborator

Ok, I found the issue in our example app and I was able to update all the dependencies. This PR #621 includes all the changes. It will be merged and release tomorrow.

@fbernaly fbernaly closed this Apr 25, 2024
@ivofernandes
Copy link
Author

Amazing :) Thanks!

@fbernaly
Copy link
Collaborator

New version with 6.0.0

https://pub.dev/packages/google_mlkit_barcode_scanning

@ivofernandes
Copy link
Author

Thanks :)

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

Successfully merging this pull request may close these issues.

2 participants