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

Conflict with Firebase #235

Closed
TercyoStorck opened this issue Sep 3, 2024 · 11 comments
Closed

Conflict with Firebase #235

TercyoStorck opened this issue Sep 3, 2024 · 11 comments

Comments

@TercyoStorck
Copy link

TercyoStorck commented Sep 3, 2024

I'm trying to add firebase analytics in my project that uses qr_mobile_vision. But I'm facing this error when build for iOS (or run pod install).

I've tried pod repo update and pod install --repo-update also. But get the same error over and over.

  In snapshot (Podfile.lock):
    GoogleUtilities/UserDefaults (= 8.0.2, ~> 8.0)

  In Podfile:
    firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`) was resolved to 11.3.0, which depends on
      Firebase/Analytics (= 11.0.0) was resolved to 11.0.0, which depends on
        Firebase/Core (= 11.0.0) was resolved to 11.0.0, which depends on
          FirebaseAnalytics (~> 11.0.0) was resolved to 11.0.0, which depends on
            FirebaseInstallations (~> 11.0) was resolved to 11.1.0, which depends on
              GoogleUtilities/UserDefaults (~> 8.0)

    qr_mobile_vision (from `.symlinks/plugins/qr_mobile_vision/ios`) was resolved to 0.0.1, which depends on
      GoogleMLKit/BarcodeScanning was resolved to 0.60.0, which depends on
        GoogleMLKit/MLKitCore (= 0.60.0) was resolved to 0.60.0, which depends on
          MLKitCommon (~> 0.60.0) was resolved to 0.60.0, which depends on
            GoogleUtilities/UserDefaults (~> 6.0)


You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `GoogleUtilities/UserDefaults` inside your development pod `qr_mobile_vision`.
   You should run `pod update GoogleUtilities/UserDefaults` to apply changes you've made.```
@rmtmckenzie
Copy link
Owner

The version you're using appears to be quite old. This plugin doesn't specify which version of the barcode scanning library to use, that's all up to the app.

Have you tried updating GoogleMLKit/BarcodeScanning?

That should be with:

pod update GoogleMLKit/BarcodeScanning

And it might not be a bad idea to run pod update for all pods.

Or check your Podfile to make sure you didn't add a constraint.

@TercyoStorck
Copy link
Author

TercyoStorck commented Sep 4, 2024

Yes. I've try all these. But, still not working. =/

@scopendo
Copy link

I had a similar issue except with GoogleDataTransport after updating from package firebase_core 3.2.0 to 3.4.1, after running:

$ flutter clean; flutter pub get
$ cd ios
$ rm Podfile.lock
$ rm -rf Pods
$ pod install --repo-update

I reverted to firebase_core 3.2.0 and it was fine again.

@scopendo
Copy link

scopendo commented Sep 23, 2024

@rmtmckenzie – probably like many developers, I blow away Podfile.lock and Pods as in my previous comment. This still gives the same error with version 5.0.1 of the qr_mobile_vision package.

Should a minimum version of GoogleMLKit/BarcodeScanning be specified in the plugin's podspec?

@rmtmckenzie
Copy link
Owner

I haven't worried about a minimum constraint as this plugin has been using the BarcodeScanning pod since it was first published by Google under that name (it was Firebase Mobile Vision before that), so any version should work so long as things like this don't come up.

As to the firebase core issue, there's really not anything I can do about it as it is between the two teams at google. There is an issue open on their bug tracker, you can +1 it to hopefully prompt them to resolve this sooner.

@mauriziopinotti
Copy link

Looks like there's a new MLKitBarcodeScanning 6.0.0 that uses MLKitCommon 12.0.0 that uses GoogleDataTransport 10.0, so that should make it.

https://github.com/CocoaPods/Specs/blob/master/Specs/b/5/4/MLKitBarcodeScanning/6.0.0/MLKitBarcodeScanning.podspec.json
https://github.com/CocoaPods/Specs/blob/master/Specs/c/c/6/MLKitCommon/12.0.0/MLKitCommon.podspec.json

@lovelessX
Copy link
Contributor

Yeah, they released the fix for https://issuetracker.google.com/issues/362452861, @rmtmckenzie. I'm still having a pod issue but maybe it's something on my side.

@lovelessX
Copy link
Contributor

Note you now have to ensure your app's minimum iOS version is 15.5 to support the latest update from Google.

@mauriziopinotti
Copy link

I have pushed to fix this, while not merged you can temporarily override the dependency by using

dependency_overrides:
  # Waiting for https://github.com/rmtmckenzie/flutter_qr_mobile_vision/pull/238
  qr_mobile_vision:
    git: https://github.com/easyhour/flutter_qr_mobile_vision.git

@lovelessX
Copy link
Contributor

@rmtmckenzie As long as iOS apps target 15.5, I believe this issue can now be closed. Whether or not you want to enforce it with #238 is up to you.

@rmtmckenzie
Copy link
Owner

I've updated the example and added something in the README about the iOS version. I'd rather not enforce a minimum version as it is still possible to use older versions of Firebase and the BarcodeScanner library if you need to target ios versions > 15.5.

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