CocoaPods could not find compatible versions for pod Firebase/Core” | cloud_firestore, Flutter
My setup: VS Code, Flutter
If you don't have Podfile.lock
file and pod update
doesn't help, try this:
- Go to
ios/Pods/Local Podspecs
directory in your project - Check every
json
file to find highest required ios version. Mine was"ios": "10.0"
in some of them - Go back to
ios/
directory - Open
Podfile
file - Uncomment
# platform :ios, '9.0'
and replace9.0
with version from 2. step, for example10.0
.# platform :ios, '9.0'
>platform :ios, '10.0'
- Run
pod install
and the error should be gone
CocoaPods could not find compatible versions for pod Firebase/CoreOnly
Try calling pod repo update
if the issue is not fixed
delete the Podfile.lock in the root directory, after that run pod install
Flutter: CocoaPods could not find compatible versions for pod Firebase/Messaging
This problem can occur when using a Mac with the M1 chip.
The 'CocoaPods could not find compatible versions for pod "Firebase/Messaging' error wil be solved when solving first the 'pod repo update' error.
I've tried different solutions but the ones that worked for me was the following.
Steps to follow:
- On the terminal run:
sudo arch -x86_64 gem install ffi
- On the ios project folder run:
arch -x86_64 pod install --repo-update
instead ofpod repo update
(just in case delete the Podfile.lock before this step) - Now your build should be successful, press F5.
Ther are more solutions mentioned on Github.
I finally found mine on this comment.
Error in Pod install: CocoaPods could not find compatible versions for pod FirebaseFirestore
This issue is resolved, I just changed the tag as 8.0.0
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.0.0'
How do I resolve the pod install error on flutter?
As the error said, we have incompatibility with the firebase package so:
I went to the Podfile and upgrade to 10 (platform :ios, '10.0') and the error go away;
as additional note:
I had that line commented before, so my first try was uncomment and upgrade to 9, but it wasn't work.
Can't build ipa for Flutter project [CocoaPods could not find compatible versions for pod GoogleAppMeasurement:]
[Edit] google_mobile_ads 2.0.0 has been released to fix this issue
So I found the solution. After staring at Google-Mobile-Ads-SDK
for hours I thought why not just manually change the version in the .symlinks
folder. I did not work and I got some error about some missing credential. So then I searched for google_mobile_ads ios
and found out that the latest version available is so high up. The maximum version flutter uses is from 2021‑11‑17
last year. My guess is there might be trouble migrating it to SDK v9 (I don't know what that is). Anyways that's just a theory, I don't know much about iOS plugins.
Now the solution, I figured at least someone on github has had this same issue and I was right google_mobile_ads it's a p1 issue so hopefully it'll be fixed soon. For now, just replace the dependency like this:
google_mobile_ads:
git:
url: https://github.com/googleads/googleads-mobile-flutter
ref: 356875362ddb2ac2e0056385d2729c093722fb8d
path: packages/google_mobile_ads
And it'll work like @jonafeucht on github said. It's a workaround but I've found no isssues with it so far. Although I had to fix a few other issues I created for myself in an attempt to get the project to run.
Related Topics
Uitableviewcelldeleteconfirmationcontrol Issue
Change Width of a Uibarbuttonitem in a Uinavigationbar
How to Express Strings in Swift Using Unicode Hexadecimal Values (Utf-16)
Alert View Is Showing White Rectangle in iOS7
Swiftui - Animations Triggered Inside a View That's in a List Doesn't Animate the List as Well
Uitextfield in Uialertcontroller (Border, Backgroundcolor)
Swift: Retrieving Text from a Uitextfield in a Custom Uitableviewcell and Putting It in an Array
Dismissing Both Uinavigation Views and Modal Views at Once Programmatically
Undefined Symbols for Architecture I386: "_Objc_Class_$_Zipexception", Referenced From: Error
Button Action in Mkannotation View Not Working
Xcode 7 Supporting Watch Os1 and Os2
Uiwebview and Safari Comparison
Changed +Load Method Order in Xcode 7
How to Calculate Actual Font Point Size in iOS 7 (Not the Bounding Rectangle)
Setting "Applelanguages" Doesn't Change App Language
Singleton in iOS Objective C Doesn't Prevent More Than One Instance
Uitextfield -Webview No Longer Supported
Warning: Output of Vertex Shader 'V_Gradient' Not Read by Fragment Shader