CocoaPods could not find compatible versions for pod "Firebase/Core” | cloud_firestore, Flutter
Solution 1
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
Solution 2
pod update
Should do the trick. You're welcome :-)
Solution 3
This issue can happen when you upgrade your FlutterFire packages and attempt to build for iOS or macOS, this is usually down to one of the following:
Here is some reason and their solution
- BREAKING FEAT: forward port to firebase-ios-sdk v7.3.0.
Due to this SDK upgrade, iOS 10 is now the minimum supported version by FlutterFire. Please update your build target version.
Solution:
Go to the file
ios/Podfile
inside your project, and uncomment# platform :ios, '9.0'
Then change the version to 10
platform :ios, '10.0'
And Go back to ios/ directory and Run
pod install
in your terminal and try your build again.
Your
Podfile.lock
version inside your iOS or macOS directory is out of date and locked to older versions of the Firebase iOS SDKs whereas the newly upgraded FlutterFire packages might be using newer versions of these SDKs.Solution: Delete the
Podfile.lock
file and try your build again. This file will get regenerated after the nextpod install
.Your pod specs repo is out of date, meaning CocoaPods locally isn't aware of any potential newer versions of the Firebase iOS SDKs that have been recently published.
Solution: Go back to ios/ directory and Run
pod repo update
in your terminal and try your build again.
Solution 4
On mac M1 (in ios folder), try arch -x86_64 pod update
. Worked for me
Solution 5
I got a similar error:
Specs satisfying the `firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)` dependency were found, but they required a higher minimum deployment target.
What did not work for me:
As per the other answers, I went to the Podfile
& updated:
- from:
# platform :ios, '9.0'
- to:
platform :ios, '13.0'
Then tried flutter run
again but this time it was stuck at:
Running Xcode build...
.
The wait was unnatural & my patience grew thin so I discarded this change & looked for another solution.
Finally, What worked for me:
flutter clean
flutter pub get
flutter run
No need to modify Podfile
to specify a minimum ios target 🎉
Jashan PJ
I have over 10 years of experience working in mobile application development. Currently, I am working as Team Lead(Naico ITS Kochi), in this role I am developing and managing applications in native android, react native and flutter.
Updated on January 14, 2022Comments
-
Jashan PJ over 2 years
I am having some issues in the pod, see below
Launching lib/main.dart on iPhone X in debug mode... Running pod install... CocoaPods' output: ↳ Preparing
Analyzing dependencies Inspecting targets to integrate Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``) Fetching external sources -> Fetching podspec for `Flutter` from `.symlinks/flutter/ios` -> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios` -> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios` -> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios` -> Fetching podspec for `url_launcher` from `.symlinks/plugins/url_launcher/ios` Resolving dependencies of `Podfile` [!] CocoaPods could not find compatible versions for pod "Firebase/Core": In Podfile: cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on Firebase/Core Specs satisfying the `Firebase/Core` dependency were found, but they required a higher minimum deployment target. CocoaPods could not find compatible versions for pod "GoogleUtilities/MethodSwizzler": In Podfile: cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on Firebase/Core was resolved to 5.8.0, which depends on FirebaseAnalytics (= 5.1.2) was resolved to 5.1.2, which depends on GoogleUtilities/MethodSwizzler (~> 5.2.0) Specs satisfying the `GoogleUtilities/MethodSwizzler (~> 5.2.0)` dependency were found, but they required a higher minimum deployment target. CocoaPods could not find compatible versions for pod "gRPC-Core": In Podfile: cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on Firebase/Firestore was resolved to 5.8.0, which depends on FirebaseFirestore (= 0.13.3) was resolved to 0.13.3, which depends on gRPC-C++ (~> 0.0.3) was resolved to 0.0.3, which depends on gRPC-C++/Implementation (= 0.0.3) was resolved to 0.0.3, which depends on gRPC-Core (= 1.14.0) cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 0.0.1, which depends on Firebase/Firestore was resolved to 5.8.0, which depends on FirebaseFirestore (= 0.13.3) was resolved to 0.13.3, which depends on gRPC-ProtoRPC (~> 1.0) was resolved to 1.14.1, which depends on gRPC-ProtoRPC/Main (= 1.14.1) was resolved to 1.14.1, which depends on gRPC (= 1.14.1) was resolved to 1.14.1, which depends on gRPC/Main (= 1.14.1) was resolved to 1.14.1, which depends on gRPC-Core (= 1.14.1) /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:328:in `raise_error_unless_state' /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict' /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:308:in `tap' /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:308:in `unwind_for_conflict' /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:684:in `attempt_to_activate' /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:254:in `process_topmost_state' /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolution.rb:182:in `resolve' /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.5/lib/molinillo/resolver.rb:43:in `resolve' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/resolver.rb:123:in `resolve' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:781:in `block in resolve_dependencies' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:779:in `resolve_dependencies' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:88:in `analyze' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:243:in `analyze' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:154:in `block in resolve_dependencies' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:153:in `resolve_dependencies' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:116:in `install!' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in `run' /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>' /usr/local/bin/pod:22:in `load' /usr/local/bin/pod:22:in `<main>'
Error output from CocoaPods: ↳ [33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding. Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8 [0m [!] Automatically assigning platform `ios` with version `8.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`.
Error running pod install Error launching application on iPhone X.
-
Random Code Monkey over 5 yearsUpdate I got this to work by adding this line to my Podfile: pod 'Firebase', '~> 5.7'
-
Raz Buchnik almost 5 yearsI get this error: Analyzing dependencies [!] CocoaPods could not find compatible versions for pod
-
tcone33 about 4 yearsThis will update all your pods though, which you might not want. I think Random Code Money's solution is better. Basically clear the Cocoapod cache from the project and reinstall.
-
ymerdrengene over 3 yearsJust to clarify. If using Android Studio --> Press Terminal --> cd ios --> pod update
-
Shazamo Morebucks over 3 yearsYeah I did this too, worked. I think the flutterfire team needs to fix their dang dependencies
-
Modesto Cabrera about 3 yearsagree @ShazamoMorebucks this is very cumbersome, I believe tech lead's comments on YouTube regarding Flutter have a lot of merit. I don't see Flutter as a long term solution as its fundamentally broken with so many issues that are never fixed.
-
Renaud Tarnec about 3 yearsIt's important not forgetting to uncomment the
# platform :ios, '9.0'
line as it is commented by default and one may not see that immediately. -
Utku about 3 yearsThis solution painkiller for me. Thank you.
-
Neo almost 3 yearsLegend. Thanks a lot
-
Chen Li Yong almost 3 yearsThis works for me, but I just need to uncomment the platform on podfile one, and increase the minimum platform to 11.0 no need to go into each local podspecs.
-
Kenneth Murerwa almost 3 yearsWhy isn't this marked as the answer already?
-
Phill Z almost 3 yearsTo get the version numbers out of all the json files, run this command: find ios/Pods/Local\ Podspecs/ -name \*.json -exec jq -r '.platforms.ios' {} \; | sort -un
-
jaspreet Singh almost 3 yearsYes! it worked. It saved lots of time for me
-
Adam Pearlman over 2 yearsHappy to be your 100th upvote!
-
Utku A. over 2 yearsI had to realize couple of steps more. Here is the answer which I'm referring: stackoverflow.com/a/69249116/12051755
-
Poornima Mishra over 2 yearsit worked for me .thanks
-
Marcus Rohden over 2 yearsworked for me! thanks :)
-
karrar kazuya over 2 yearsthis worked for me
-
Arun Panneerselvam over 2 yearsPlatform : ios , '14.0' and arch -x86_64 pod update <- Worked like a charm!
-
Adam Smaka over 2 yearson M1 macs:
arch -x86_64 pod update
-
Rustam Usmanov about 2 yearshuh thanks man :)
-
Benoît Cerise about 2 yearsThis is what worked for me on Mac M1.
-
Ali Aljabri almost 2 yearsThis is the perfect solution
-
Shalabyer almost 2 yearsCMD+Shift+F and write
platforms": {
and scroll between all targets in your dir