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

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!

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.

Missing compatible version from cocopods in flutter /firebase project

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.

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

Flutter: unable to run application on iOS emulator

The code worked fine. As the firebase packages got updated in the pub.dev website, I changed the firebase instances to the new version. After that, I guess the firebase package didn't install properly and threw this error when I ran flutter run for the iOS emulator.
rishikrishna#Rishikrishnas-MacBook-Pro chat_server % flutter run
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running pod install... 0.9s
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Finding Podfile changes
A firebase_storage
- Flutter
- cloud_firestore
- firebase_auth
- firebase_core
- image_picker
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
cloud_firestore: Using Firebase SDK version '6.26.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
firebase_auth: Using Firebase SDK version '6.26.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
firebase_core: Using Firebase SDK version '6.26.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_storage` from `.symlinks/plugins/firebase_storage/ios`
firebase_storage: Using Firebase SDK version '6.26.0' defined in 'firebase_core'
-> Fetching podspec for `image_picker` from `.symlinks/plugins/image_picker/ios`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/0/3/5/Firebase/6.20.0/Firebase.podspec.json exists! Returning local because checking is only
performed in repo update
CDN: trunk Relative path: Specs/0/3/5/Firebase/6.20.0/Firebase.podspec.json exists! Returning local because checking is only
performed in repo update
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
In snapshot (Podfile.lock):
Firebase/CoreOnly (= 6.20.0)
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.14.0-2, which depends on
Firebase/CoreOnly (~> 6.26.0)
Specs satisfying the `Firebase/CoreOnly (= 6.20.0), Firebase/CoreOnly (~> 6.26.0)` dependency were found, but they required a higher
minimum deployment target.
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:257:in `process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:986:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:984:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:234:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:233:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error running pod install
Error launching application on iPhone 11 Pro Max.
Flutter doctor:
rishikrishna#Rishikrishnas-MacBook-Pro chat_server % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.3, on Mac OS X 10.15.6 19G2021, locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
✗ Android license status unknown.
Try reinstalling or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/docs/get-started/install/macos#android-setup for
detailed instructions.
[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.49.1)
[✓] Connected device (1 available)
! Doctor found issues in 1 category.
Also, I reinstalled all packages and tried flutter clean.
Open for ideas.
Open the Runner.xcworkspace in Xcode then clean and build the project and try to re-run.
This works for me. I was facing the same issue.

Resources