Missing compatible version from cocopods in flutter /firebase project - firebase

just git a big problem with the installed pods on my flutter/firebase project.
Get this message every time after "pod install":
"Analyzing dependencies
cloud_firestore: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
cloud_functions: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
firebase_analytics: 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'
[!] CocoaPods could not find compatible versions for pod "cloud_firestore":
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)
Specs satisfying the `cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)` dependency were found, but they required a higher minimum deployment target."
Im on a Mac M1, but most tricks from stack overflow aso don't help much.
Already installed with "sudo arch -x86_64 gem install ffi" & "arch -x86_64 pod install"
Heres are the dependencies:
flutter:
sdk: flutter
firebase_core: ^1.3.0
firebase_analytics: ^8.1.2
firebase_auth: ^1.4.1
cloud_firestore: ^2.2.0+1
cloud_functions: ^1.1.2
After deleting one, the given message from above appears with a new pod.
I really don't know what to do after hours...
thanks!

You can try this way,
First Flutter clean then, From ios folder delete .symlinks, Pods, Podfile.lock and Runner.xcworkspace.
then run pub get.
Hope it will work for you.

Related

cannot run the flutter app after firebase connection

After i added the GoogleService-Info.plist file to Runner on xcode, I get this error.
(I work on an M1 Chip MacBook Air)
I uninstalled each cocoapods version, and installed again using the ARM version (sudo arch -x86_64 gem install cocoapods).
But nothing changed.
Edit: Just tried the pod install method inside the ios folder and this is what happened;
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '8.11.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '8.11.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '8.11.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "cloud_firestore":
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)
Specs satisfying the `cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)` dependency were found, but they required a higher minimum deployment target.
[!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
you need first to upgrade your package by write "pub upgrade" command
after it try to update podfile as below setups :
inside terminal move to ios folder "cd ios"
enter "pod update" command
if above point not working try "pod install" command
Final edit: I solved it thanks to this issue. The problem was that there's no Podfile.lock in the /ios folder.

How can I find compatible dependency versions for my flutter project? (Firebase_auth, cloud_firestore, intl, flutter_dialogflow_v2)

So I have these dependencies which work fine together:
dependencies:
flutter:
sdk: flutter
auto_size_text: ^2.1.0
#Firebase
# cloud_firestore: ^1.0.0
firebase_auth: ^0.18.0+1
google_sign_in: ^4.0.4
provider: ^4.3.2+1
flutter_dialogflow_v2: ^0.3.2
bubble: ^1.2.1
intl: ^0.16.1
material_design_icons_flutter: ^4.0.5955
flutter_spinkit: "^4.1.2"
auth_buttons: ^1.0.1+3
Now if I add cloud_firestore, no matter what version, I get this error:
Because firebase_auth ^0.18.3+1 depends on firebase_core_platform_interface ^2.1.0 and firebase_auth >=0.18.0 <=0.18.3 depends on firebase_core_platform_interface >=2.0.0 <2.1.0, firebase_auth ^0.18.0 requires firebase_core_platform_interface >=2.0.0 <2.1.0 or ^2.1.0.
And because cloud_firestore >=2.1.0 depends on firebase_core_platform_interface ^4.0.1, firebase_auth ^0.18.0 is incompatible with cloud_firestore >=2.1.0.
It seems that the firebase_core_platform_interface is the problem here because two dependencies depend on different versions.
Is there a way of checking the best version mix for this dependency setup?
I can't figure it out.
Set them all to any, then run flutter pub get.
Now you can look in the pubspec.lock file and see what versions you got and put them in pubspec.yaml.

Flutter - No compatible iOS versions between Flutterfire and Geofire (pods)

I'm trying to get all my dependencies updated for null safety and the following scenario when I run pod install:
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
cloud_functions: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_analytics: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_database: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '7.3.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.3.0)
flutter_geofire (from `.symlinks/plugins/flutter_geofire/ios`) was resolved to 0.0.1, which depends on
GeoFire (~> 4.2) was resolved to 4.2.0, which depends on
GeoFire/Database (= 4.2.0) was resolved to 4.2.0, which depends on
Firebase/Database (~> 7.8.0)
Checking the native ios geofire and flutterfire library, I realize that the current version from geofire for iOS aims firebase database ~> 7.8 and the previously one database ~> 6.x.x.
Flutterfire null safety aims firebase 7.3.
Turning actually impossible to find a version with null-safety compatible between flutterfire and geofire.
I have tried before completely remove my pods with the commands without success:
cd ios
rm -rf Pods
rm -rf Podfile.lock
rm -rf ~/.pub-cache/hosted/pub.dartlang.org/
pod cache clean --all
pod deintegrate
flutter clean
flutter pub get
pod repo update
pod install
Any suggestions? thank you!

How can I resolve the cloud_firestore dependancy error?

I had changed the version of cloud_firestore from 0.16.0 to 0.15.0 since it was not working. However, it did not resolve my issue - and now when I changed the version back to 0.16.0 it is giving me the same error with 0.15.0 version, even though I changed it to 0.16.0.
dependencies:
flutter:
sdk: flutter
provider: ^4.3.2+2
dotted_line: ^2.0.2
intl: ^0.16.1
uuid: ^2.2.2
cloud_firestore: ^0.16.0
firebase_auth: ^0.20.0+1
smooth_star_rating: ^1.0.4
google_maps: ^4.0.0
firebase_core: ^0.7.0
rxdart: ^0.24.1
This is the error I am getting when I save my pubspec.yaml file:
Because my_app depends on cloud_firestore ^0.15.0 which depends on
firebase_core ^0.6.0, firebase_core ^0.6.0 is required. So, because
my_app depends on firebase_core ^0.7.0, version solving failed. pub
get failed (1; So, because my_app depends on firebase_core ^0.7.0,
version solving failed.) exit code 1
Firebase packages depend on every other package's version. If you want to use the specific version then look for other firebase dependencies with the compatible version.
According to the error that you get, the cloud_firestore ^0.15.0 required the firebase_core ^0.6.0.
If you are getting the same error after reverting back to the cloud_firestore ^0.16.0 then run the $ flutter clean command and then rebuild the application. This will remove the previously cached data and freshly build the app. Be sure you had run the $ flutter pub get command after reverting back to cloud_firestore ^0.16.0

Flutter firebase packages versions conflicting between messaging, core and analytics

I have 3 packages from firebase:
firebase_core: ^0.5.0+1
firebase_messaging: ^7.0.3
firebase_analytics: ^7.0.1
when I build it fails always cuz of versions. I have tried changed versions to downgrade but couldn't able to build the app.
pod install --repo-update didn't work
all pods files remove and clear cache didn't work
The error says that you can't use firebase_analytics >=7.0.1 with older versions of core...
Because firebase_analytics >=7.0.1 depends on firebase_core ^0.7.0 and [app_name] depends on firebase_core ^0.5.0+1, firebase_analytics >=7.0.1 is forbidden.
Either update firebase_core: ^0.7.0 or downgrade firebase_analytics: ^6.0.2 and firebase_messaging ^0.7.0

Resources