Error after adding firebase_auth to flutter app - flutter

i've added firebase_auth and get this error
CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
In Podfile:
firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 4.0.2, which depends on
Firebase/Auth (= 10.0.0) was resolved to 10.0.0, which depends on
FirebaseAuth (~> 10.0.0) was resolved to 10.0.0, which depends on
GTMSessionFetcher/Core (~> 2.1)
mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) was resolved to 0.0.1, which depends on
GoogleMLKit/BarcodeScanning (~> 2.6.0) was resolved to 2.6.0, which depends on
MLKitBarcodeScanning (~> 1.7.0) was resolved to 1.7.0, which depends on
MLKitVision (~> 3.0) was resolved to 3.0.0, which depends on
GTMSessionFetcher/Core (~> 1.1)
if i remove the firebase_auth, everything goes fine .
i've tried to use arch -x86_64 pod install with no success .
any one faced this issue?

Both the packages (firebase_auth and mobile_scanner) are using GTMSessionFetcher pod internally in iOS.
As both plugin uses different version of GTMSessionFetcher it causes conflicts, thus we are not able to compile iOS app.
There is one open issue in firebase-ios-sdk where we can get all the updates, as of now I am also not able to found any issues, but will update here if I found anything important. Thanks.
Update
I found two more linked issues.
Issue 1
Issue 2

For me Updating all the firebase dependencies to the latest version and google sign in version removed this error.
Then, run pod install.

Try to remove Podile.lock and rebuild the app
UPDATE
Sometimes problems happen due target ios platform. Try to do these steps:
flutter clean
update all dependencies to the latest version in pubspec.yml file and do flutter pub get
Go to your Podfile and uncomment #platform :ios, '9.0' Then change the version to 10 platform :ios, '10.0'
go to ios folder and throuh the terminal run command: pod repo update, pod update or pod install

Related

Objectbox flutter apple silicon emulator support

Does objectbox flutter support ios emulator on M1 macbooks?
I get this error despite following Getting started guide, however it works fine in CI which also runs on M1 chip (but against physical phone engine snapshot, not the emulator)
$ pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "ObjectBox":
In snapshot (Podfile.lock):
ObjectBox (= 1.7.0)
In Podfile:
objectbox_flutter_libs (from `.symlinks/plugins/objectbox_flutter_libs/ios`) was resolved to 0.0.1, which depends on
ObjectBox (= 1.8.1)
Specs satisfying the `ObjectBox (= 1.7.0), ObjectBox (= 1.8.1)` dependency were found, but they required a higher minimum deployment target.
From what I can see, 1.7.2 requires swift 5.7.2 which according to a quick google search should be supported by ios 14
I've tried rolling back to 1.6.2 and changing deployment target up to 14 (from 11) but the error is still there.
How do I fix that?
I deleted Podfile.lock and then ran flutter pub get followed by pod install which seems to have solved the issue

Flutterfire Package Dependency errors on MacOs build

I have just transferred (via GitHub) my app repo from my WIn 11 machine to my Mac Mini M1 (Ventura) to start testing on iOS. All was going fairly well until I get this message when doing a pod install:
[15:20]
[!] CocoaPods could not find compatible versions for pod "Firebase/Database":
In Podfile:
firebase_database (from .symlinks/plugins/firebase_database/ios) was resolved to 10.0.9, which depends on
Firebase/Database (= 10.3.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 have tried all the answers I have seen on SO that relate to this but to no avail.
The app builds fine for Android on Win11 but gives the above dependencies error when building for iOS.
This is the command sequence I use to clean the environment on the Mac:
Delete pubspec.lock
Change to iOS directory
rm -rf Pods
rm -rf Podfile.lock
rm -rf ~/Library/Flutter/.pub-cache/hosted/pub.dartlang.org/
pod cache clean --all
flutter clean
flutter pub get
pod repo update
pod install
Anyone else experienced this with flutterfire packages? Any advice welcome. :-)
I am trying down-versioning some of them, but as you know that is a minefield and not the end solution.
Try to delete Podfile.lock file, then run pod install once again. If that does not help, try to upgrade flutter packages using flutter pub upgrade. Also pass —repo-update to pod install.

CocoaPods could not find compatible versions for pod "Sentry"

[!] CocoaPods could not find compatible versions for pod "Sentry":
In Podfile:
sentry_flutter (from .symlinks/plugins/sentry_flutter/ios) was resolved to 0.0.1, which depends on
Sentry (~> 7.11.0)
None of your spec sources contain a spec satisfying the dependency: `Sentry (~> 7.11.0)`.
I am just trying to install sentry_flutter plugin in my futter project. Currently i am testing in ios device. But it gives the above error.
The error message seems straight forward enough. But i cannot manage to include this plugin in my project.
you can run pod repo update to update your local cache bcause it may be outdated.
If it doesn't fix the issue for you, you can delete your Podfile.look file on ios folder and run pod install

Is the Flutter pod in Cocoapods the same as the Flutter SDK?

I'm currently working on a project that uses Cocoapods in Flutter 2.2.3 and I'm having Issues with the Flutter pod that in included when I run pod install. The version it is giving me is Flutter 1.0.0, even though I'm building the app using flutter 2.2.3.
This is the output I get from running pod outdated:
Updating spec repo `trunk`
Analyzing dependencies
The color indicates what happens when you run `pod update`
<green> - Will be updated to the newest version
<blue> - Will be updated, but not to the newest version because of specified version in Podfile
<red> - Will not be updated because of specified version in Podfile
The following pod updates are available:
- Firebase 8.3.0 -> (unused) (latest version 8.4.0)
- FirebaseCore 8.3.0 -> 8.3.0 (latest version 8.4.0)
- Flutter 1.0.0 -> 1.0.0 (latest version 2.0.2)
This begs the question, is the Flutter pod equivalent and/or overriding the Flutter SDK? I don't think it is but I haven't been able to find any concrete explanation of what the difference between the two are. I tried looking up the Flutter pod on the cocoapods website but the description did not prove helpful at all.
I was wondering the same and came across this issue: https://github.com/flutter/flutter/issues/53673
It looks like this is to be expected and doesn't really matter:
This is expected. The Flutter framework isn't downloaded from CocoaPods; it's copied from your installed Flutter SDK. So it's hard-coded to 1.0 since there's no version resolution for CocoaPods to handle. If you see actual issues related to this, pleas let us know!
Rather confusing given that CocoaPods shows you there's a newer version.

podfile error when running flutter application

This is the error when I try to run ios app.
[!] CocoaPods could not find compatible versions for pod "FBSDKLoginKit":
In Podfile:
flutter_facebook_auth (from `.symlinks/plugins/flutter_facebook_auth/ios`) was resolved to 0.3.1, which depends on
FBSDKLoginKit (~> 7.1.0)
flutter_facebook_login (from `.symlinks/plugins/flutter_facebook_login/ios`) was resolved to 0.0.1, which depends on
FBSDKLoginKit (~> 5.5)
and I have done some research and show some article saying to do flutter clean and deleting podfile and then rerunning. But that didn't save me. Anyone know to bypass this.