Home > Enterprise >  CocoaPods could not find compatible versions for pod "Firebase/Database" [Geofire issue]
CocoaPods could not find compatible versions for pod "Firebase/Database" [Geofire issue]

Time:11-02

As there is constant update with firebase plugins I run into cocopod errors, what exactly is this error and how do I resolve this ? I have had one before and resolved it but with newer packages and older plugins this error keeps popping up.

Analyzing dependencies
Pre-downloading: `GeoFire` from `https://github.com/jesussmile/geofire-objc.git`
firebase_auth: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_database: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '10.0.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Firebase/Database":
  In Podfile:
    GeoFire (from `https://github.com/jesussmile/geofire-objc.git`) was resolved to 4.3.0, which depends on
      GeoFire/Database (= 4.3.0) was resolved to 4.3.0, which depends on
        Firebase/Database (= 9.3.0)

    firebase_database (from `.symlinks/plugins/firebase_database/ios`) was resolved to 10.0.3, which depends on
      Firebase/Database (= 10.0.0)

CodePudding user response:

Try pod clean. For cleaning pod files and caches.

It's done using pod install for installing pod files.

CodePudding user response:

  1. Just delete pubspec.lock, whole ios/Pods folder, ios/Podfile.lock file.
  2. Run flutter pub get
  3. via Terminal cd ios
  4. If you are not silicon mac(M1, M1Pro, M1X) user pod install or if it shows error run pod install --repo-update as it will be said in error message too.
  5. If you are silicon mac user then you just need to do line-4 commands with prefix arch -x86_64. Then they would be arch -x86_64 pod install or arch -x86_64 pod install --repo-update

CodePudding user response:

I made a copy of the geofire-objc repository then in the file GeoFire.podspec changed db.ios.dependency 'Firebase/Database', '10.0.3' to the firebase database version i was using , in this case 10.0.3 . Now its working fine.

  • Related