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:
- Just delete
pubspec.lock
, wholeios/Pods
folder,ios/Podfile.lock
file. - Run
flutter pub get
- via Terminal
cd ios
- If you are not silicon mac(M1, M1Pro, M1X) user
pod install
or if it shows error runpod install --repo-update
as it will be said in error message too. - If you are silicon mac user then you just need to do line-4 commands with prefix
arch -x86_64
. Then they would bearch -x86_64 pod install
orarch -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.