Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting "CocoaPods could not find compatible versions for pod "Firebase/Database" " Error on flutter

i have followed an exact guide on how to setup a geofire on to my project. i have success on my android project.. but i cant get it to run for the ios.. and it has the following error as i try to run it.

[!] CocoaPods could not find compatible versions for pod "Firebase/Database":
  In Podfile:
    firebase_database (from `.symlinks/plugins/firebase_database/ios`) was resolved to 6.1.2, which depends on
      Firebase/Database (= 7.11.0)

    flutter_geofire (from `.symlinks/plugins/flutter_geofire/ios`) was resolved to 0.0.1, which depends on
      GeoFire (~> 4.0) was resolved to 4.1.0, which depends on
        Firebase/Database (~> 6.0)

I've tried to run pod update and this is the result

Macbook-MBP:ios Macbook$ pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
firebase_auth: Using Firebase SDK version '7.11.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '7.11.0' defined in 'firebase_core'
firebase_database: Using Firebase SDK version '7.11.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Firebase/Database":
  In Podfile:
    firebase_database (from `.symlinks/plugins/firebase_database/ios`) was resolved to                             
    6.1.2, which depends on Firebase/Database (= 7.11.0)

    flutter_geofire (from `.symlinks/plugins/flutter_geofire/ios`) was resolved to 0.0.1,
     which depends on
  GeoFire (~> 4.0) was resolved to 4.1.0, which depends on
    Firebase/Database (~> 6.0)

and this is what i've imported to my pubspec.yaml file..

  firebase_database: ^6.1.2
  flutter_geofire: ^2.0.0

i dont understand what im doing wrong, any help would be appreciated.. thanks

like image 750
Danny Avatar asked Oct 21 '25 23:10

Danny


1 Answers

for anyone that is facing this issue,

  1. run flutter clean in the terminal
  2. add this line at the bottom of the podfile
    pod 'GeoFire', :git => 'https://github.com/mrdishant/geofire-objc', :tag => '4.3.0'
  3. dont forget to add use_frameworks! on top of the podfile
  4. delete Pod folder from iOS.
  5. change platform :ios, '10.0' to platform :ios, '11.0' on the podfile
  6. run pod repo update then pod update
  7. then run flutter run in the terminal

thats how i got it working for me

like image 76
Danny Avatar answered Oct 24 '25 14:10

Danny