rmtmckenzie/flutter_qr_mobile_vision

Build fails iOS with Firebase

ncalderini opened this issue · 7 comments

Hello, thanks for this great package!

I'm having troubles trying to compile my app while using firebase, I'm getting a pod error

pod install --repo-update
Updating local specs repositories
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "GoogleDataTransport":
  In snapshot (Podfile.lock):
    GoogleDataTransport (= 9.0.0, ~> 9.0)

  In Podfile:
    firebase_core (from `.symlinks/plugins/firebase_core/ios`) was resolved to 1.2.0, which depends on
      Firebase/CoreOnly (= 8.0.0) was resolved to 8.0.0, which depends on
        FirebaseCore (= 8.0.0) was resolved to 8.0.0, which depends on
          FirebaseCoreDiagnostics (~> 8.0) was resolved to 8.0.0, which depends on
            GoogleDataTransport (~> 9.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
            GoogleDataTransport (~> 3.2)


You have either:
 * changed the constraints of dependency `GoogleDataTransport` inside your development pod `qr_mobile_vision`.
   You should run `pod update GoogleDataTransport` to apply changes you've made.

My pubspec is:

environment:
  sdk: ">=2.12.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter

  firebase_auth: ^1.2.0
  cloud_firestore: ^2.2.0
  firebase_messaging: ^10.0.0
  qr_mobile_vision: ^3.0.0

I also tried to use older firebase versions but error persists. Any help is appreciated!

Until MLKitCommon gets updated, here is the compatible firebase packages versions

  cloud_firestore: ^2.1.0
  firebase_core: 1.1.1
  firebase_auth: ^1.1.4
  firebase_analytics: ^8.0.4
  firebase_messaging: ^9.1.4
  firebase_crashlytics: ^2.0.3
  firebase_storage: ^8.0.6

Firstly, thank you for the plugin - it's great. @rmtmckenzie are you able to update this soon to fix this issue?

Firstly, thank you for the plugin - it's great. @rmtmckenzie are you able to update this soon to fix this issue?

I belive we are waiting for Google to update the MLKit for iOS.

https://developers.google.com/ml-kit/release-notes

Okay so they released a new version to fix this issue yesterday, so i hope we can upgrade this plugin soon, thanks

technically, the plugin doesn't require any particular version of the GoogleMLKit/BarcodeScanning library (see the podspec). So theoretically all you should have to do is a pod update or you could require the most recent version directly in your podfile.

Could anyone who has seen the issue confirm this? I've been really lazy about updating my app's firebase_messaging dependency so I haven't actually run into the issue yet...

Or maybe you'll have better luck with pod update --repo-update, in the iOS folder after updating your pubspec and running flutter pod update of course.

@rmtmckenzie Seems like you're correct, I was able to do a repo update successfully with this combination of Firebase-related libraries.

firebase_core: 1.3.0
firebase_auth: 2.0.0
firebase_storage: 9.0.0
google_mobile_ads: 0.13.2
firebase_crashlytics: 2.0.3
firebase_analytics: 8.1.2

IMO, this issue can be safely closed.