=2.1" /> =2.1" /> =2.1"/>

Firebase SDK 10+ - unable to install packages

46 Views Asked by At

I have the Flutter app, to run and build on iOS, the core is Flutter + Firebase, but I am not able to install packages and build projects.

  sdk: ">=2.16.1 <3.0.0"
....
  cloud_firestore: ^4.15.9
  cloud_functions: ^4.6.9
  firebase_auth: ^4.17.9
  firebase_core: ^2.27.1
  firebase_crashlytics: ^3.4.19
  firebase_messaging: ^14.7.20
  firebase_performance: ^0.9.3+18
  firebase_storage: ^11.6.10
ruby -v
ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [arm64-darwin23]
pod --version
1.15.2
M1 chip

install:

pod install
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
cloud_functions: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
Run script to upload symbols already exists.
firebase_crashlytics: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
firebase_performance: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '10.22.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
  In Podfile:
    firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 4.17.9, which depends on
      Firebase/Auth (= 10.22.0) was resolved to 10.22.0, which depends on
        FirebaseAuth (~> 10.22.0) was resolved to 10.22.0, which depends on
          GTMSessionFetcher/Core (< 4.0, >= 2.1)

    google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) was resolved to 0.0.1, which depends on
      GoogleSignIn (~> 7.0) was resolved to 7.0.0, which depends on
        GTMAppAuth (< 3.0, >= 1.3) was resolved to 2.0.0, which depends on
          GTMSessionFetcher/Core (< 4.0, >= 1.5)

    google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`) was resolved to 0.0.1, which depends on
      GoogleSignIn (~> 7.0) was resolved to 7.0.0, which depends on
        GTMSessionFetcher/Core (< 4.0, >= 1.1)

    mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) was resolved to 0.0.1, which depends on
      GoogleMLKit/BarcodeScanning (~> 3.2.0) was resolved to 3.2.0, which depends on
        MLKitBarcodeScanning (~> 2.2.0) was resolved to 2.2.0, which depends on
          MLKitVision (~> 4.2) was resolved to 4.2.0, which depends on
            GTMSessionFetcher/Core (~> 1.1)

CocoaPods could not find compatible versions for pod "nanopb":
  In Podfile:
    cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 4.15.9, which depends on
      nanopb (< 2.30910.0, >= 2.30908.0)

    firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`) was resolved to 3.4.19, which depends on
      Firebase/Crashlytics (= 10.22.0) was resolved to 10.22.0, which depends on
        FirebaseCrashlytics (~> 10.22.0) was resolved to 10.22.0, which depends on
          nanopb (< 2.30911.0, >= 2.30908.0)

If I try to downgrade Firebase SDK to $FirebaseSDKVersion = '9.6.0', works, but the build has a lot of other build fails.

1

There are 1 best solutions below

0
Paul Beusterien On BEST ANSWER

Update or remove mobile_scanner.

The log indicates that mobile_scanner locks in GTMSessionFetcher 1.x which is incompatible with FirebaseAuth 10.22.0 that requires at least GTMSessionFetcher 2.1.