I have been working on update for a Flutter app that uses Firebase Firestore, once I finished the updated and starting to build it for IOS, I got the following error message which cause the build operation to fail:
[!] CocoaPods could not find compatible versions for pod "Firebase/Auth":
In snapshot (Podfile.lock):
Firebase/Auth (= 9.3.0)
In Podfile:
firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 3.3.12, which depends on Firebase/Auth (= 8.14.0)
Note: The error message in the question says Firebase/Auth package but it also happened with other Firebase packages.
So what should I do to get over this problem?
i had the same error but the correct answer didnt work for me so i deleted the Pod.lock file and applied this steps.
so this The Solution worked for me:
Cocoa Pods Installation in M1
sudo gem install cocoapods
sudo gem install ffi
arch -x86_64 sudo gem install cocoapods -n /usr/local/bin
sudo gem install cocoapods -n /usr/local/bin
Install ffi
sudo arch -x86_64 gem install ffi
#update repo
arch -x86_64 pod install --repo-update
Flutter iOS builds
flutter clean
flutter build ios
my answer is based on this answer
Since you mentioned that you are using Firebase Firestore in your app, then you case might be the same of mine.
In the official docs of Firebase Firestore for Flutter, you will notice an Optional step that tells you to add a line in the Podfile to improve iOS & macOS build times by including the pre-compiled framework, like this one:
target 'Runner' do
...
# This is the mentioned line
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.15.0'
...
end
The solution for me was to update the tag number in the link in the line with the latest one from the repository on GitHub. Which repo? the one in the line.
At the dropdown that lets you select the branch you will find a tab for selecting a tag, just tap it and check the latest version number and use it in the line, e.g. The latest version for the time of this answer is 9.3.0, so the line would be:
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.3.0'
If it did not work, then you may totally ignore this optional step and remove this line from the Podfile. The build operation would take longer than before but it is better than a build failure.
What worked for me was running pod repo update from the XCode app directory ("ios/app" for capacitor apps) and then the pod install command.
If you are using such a line in your podfile
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.3.0'
then you need to check the repo's latest version from here to keep your pub.dev firebase packages compatible :
pre-compiled framework version
Related
[!] CocoaPods could not find compatible versions for pod "Flipper-Glog":
In Podfile:
Flipper-Glog (= 0.5.0.4)
None of your spec sources contain a spec satisfying the dependency: Flipper-Glog (= 0.5.0.4).
You have either:
out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
mistyped the name or version.
not added the source repo that hosts the Podspec to your Podfile.
Disable everything related to flipper in Podfile and then cd ios && pod install
# use_flipper!()
Worked after using this command:
pod install --repo-update
If you are building from a fresh Reach Native Project, there should be no need to edit any files in the project to get it to run.
Try the solutions here:
React native ios - error when running pod install (installing Flipper-Glog)
I encountered this problem after deleting all my iOS caches and setting some Virtual Env. Opening Xcode and simulator once then try "pod install" should work.
Remove or comment this line from your ios/Podfile in react native.
# use_flipper!()
For M1 chip Mac, run
"arch -x86_64 pod install"
solved it.
I have a react-native project with these dependencies (all are the latest available):
"#react-native-firebase/analytics": "^14.5.1",
"#react-native-firebase/app": "^14.5.1",
"#react-native-firebase/config": "^0.1.5",
"#react-native-firebase/perf": "^14.5.1",
But when I go to pod install, I get:
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
In Podfile:
RNFBApp (from `../node_modules/#react-native-firebase/app`) was resolved to 14.5.1, which depends on
Firebase/CoreOnly (= 8.12.1)
RNFBConfig (from `../node_modules/#react-native-firebase/config`) was resolved to 0.1.5, which depends on
Firebase/RemoteConfig (~> 6.5.0) was resolved to 6.5.0, which depends on
Firebase/CoreOnly (= 6.5.0)
I do not understand why config has a different version to all the others and how the latest versions of a project are conflicting.
I have tried the following to fix this:
rm -rf ios/Pods ios/Podfile.lock
pod repo remove trunk
pod install
pod update
pod install --repo-update
My ios/Podfile does not contain explicit pods for Firebase.
Usually these commands tend to fix problems like this. But not this time. Thanks for any suggestions.
react-native-firebase maintainer here!
The 'config' package was wrapping the firebase "Remote Config" SDK packages, so that name was not used in the final release of react-native-firebase - we used "remote-config" in the end, but the alpha releases with the wrong name were still up on npmjs.com.
I just deprecated all versions of that package on npmjs.com so users should get a warning if they try to install it - no one should use that package. If you use the 'remote-config' one, you'll be all set I think
The problem is that #react-native-firebase/config appears unrelated to the #react-native-firebase project, hence the different latest version and pod conflicts. I had to use #react-native-firebase/remote-config instead, as found in the documentation https://github.com/invertase/react-native-firebase
The problem is that react native update a new architecture
Open the file Podfile and add use_frameworks! :linkage => :static inside your targets
Disable the :flipper_configuration line
Put $RNFirebaseAsStaticFramework = true
at the top of podfile
Then run
pod install --repo-update
For Mac M1
arch -x86_64 pod install --repo-update
Hope this useful to someone
I solved the issue by deleting the ./ios/Podfile.lock and run again pod install --repo-update command.
I am implementing some of the firebase SDKs into my pods, but I am having an issue with versioning them. I want to set Firebase 6.33. I did check the pod spec of this version and updated my pods according to that.
pod 'Firebase', '~> 6.33.0'
pod 'FirebaseCore', '~> 6.10.3'
pod 'FirebasePerformance', '~> 3.3.0'
pod 'FirebaseRemoteConfig', '~> 4.9.0'
pod 'FirebaseAnalytics', '~> 6.8.3'
pod 'FirebaseCrashlytics', '~> 4.6.1'
When I use the codes above, it gives me this error on jenkins:
None of your spec sources contain a spec satisfying the dependencies:
Firebase (~> 6.33.0), Firebase (= 6.33.0, ~> 6.33.0).
I did pod deintegrate first and pod install to do a clean installation. It doesn't give the error on my MacBook but on jenkins.
podspec.json: https://github.com/CocoaPods/Specs/blob/master/Specs/0/3/5/Firebase/6.33.0/Firebase.podspec.json
for Apple M1 users 👇
Inside your ios Folder follow these commands in terminal
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
If not work try this
arch -x86_64 pod install --repo-update
for Apple Intel users 👇
pod install --repo-update
pod install --repo-update
to update to recent published CocoaPods pods.
For who is here with a Mac M1, trying to run pod install --repo-update in the VSCode terminal without success, the solution I found was:
Find the native Terminal on Applications
Make sure it is running with Rosetta (right click on Terminal > Obtain Information > Check Open With Rosetta)
Open the terminal
cd path_to_your_ios_folder and run pod install --repo-update. That should work!
I am using:
Pod: 1.11.0
firebase_core: ^1.6.0
firebase_crashlytics: ^2.2.1
firebase_analytics: ^8.3.1
firebase_messaging: ^10.0.6
flutter: 2.2.3
This did it for me
rm -rf Pods
rm -rf Podfile.lock
rm -rf ~/.pub-cache/hosted/pub.dartlang.org
pod cache clean --all
flutter clean
flutter pub get
pod repo update
pod install
Why all the different versions of firebase specified? For me I had three different Firebase related plugins (Analytics / Dynamiclinks / Firebasex). Each of these had a different source it was trying to pull from (some v 7.0.0 and some v 6.33.0). I went into the podfile and changed all of the versions to 6.33.0 and was able to build then.
I'm trying to install Firebase via CocoaPods for my Objective-C iOS Application. My Podfile is as follows:
target 'RandomName' do
pod 'Firebase/Core'
pod 'Firebase/AdMob'
end
When I run pod install, I get the following error:
[!] Unable to satisfy the following requirements:
- `Firebase/Core` required by `Podfile`
None of your spec sources contain a spec satisfying the dependency: `Firebase/Core`.
You have either:
* out-of-date source repos which you can update with `pod repo update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
The latest version of CocoaPods is installed, and I have tried running pod repo update. Having a Podfile of the following works fine, but when I try to #import Firebase; in my AppDelegate.m file, Xcode cannot find the module.
target 'RandomName' do
pod 'Firebase'
end
However, the following combination does not install:
target 'RandomName' do
pod 'Firebase'
pod 'Firebase/AdMob'
end
Any help would be appreciated!
Check what version of Firebase is installed when you use pod 'Firebase'. For me it installs 2.4.3 which is an old version. The docs say that the pod should install 3.2 using that pod. It explains why the other pods don't work as they are part of Firebase 3. Pod update doesn't update Firebase to the latest version either. Even forcing a version doesn't work. It can't seem to find the new Firebase versions even though they are in the same podspec.
Here is how I solved it:
make sure you have the latest version of git installed
make sure you have cocoapods >= 1.0.0 installed
delete your pods repo (run pod repo remove master) and use pod setup to make a new one
use the following in your pod file
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Core'
(use whatever you want, just don't use 'Firebase')
pod install
everything should install properly
Running 'pod repo remove master' to remove the Pods repo //removes the library
Running 'pod setup' //clones the updated git repo for specs which takes long time as its size is beyond 300K (Be patient!)
Running 'pod install' //problem is solved
have you tried to add
frameworks
use_frameworks!
after target 'RandomName' line
and adding
platform :ios, '9.0'
before target ....
A couple of items to try. From your question, you did try the first two items, but leaving here for completeness of my answer.
The error response you get is helpful. Follow the steps for pod repo update
Make sure your pod is up to date.
pwd> pod --version
1.0.0
Make certain that your git is up to date. I had a build machine that had an outdated git (1.7), and I had the same exact error
-
When I updated to this version from git 1.7 it worked fine.
pwd> git --version
git version 2.8.1
My Podfile for using Firebase Dynamic Links
run pod init from the folder where your .xcodeproj is
Be sure to only launch the .xcworkspace instead of the .xcodeproj from here out.
platform :ios, '8.0'
use_frameworks!
target 'the-name-of-target' do
pod 'Firebase/DynamicLinks'
end
The Same problem occurred while on pod install command.
Please relaunch terminal and navigate to your Xcode project then
simply fire same pod install command. 'Firebase/Database' will installed successfully :)
I just doing following step to fix this error:
$pod setup -- verbose
Then do $pod install
that works for me and my pod file is:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'the-name-of-target' do
pod 'Eureka', '~> 1.6'
end
UPDATE:
Then you can remove your master and re-install cocoapods using following code:
cd ~/.cocoapods/repos
rm -rf master
pod setup
I had the same error, and my solution was to downgrade Cocoapods to 1.0.0, because Cocoapods 1.0.1 didn't work as I expected. Everything works great now!
sudo gem uninstall cocoapods -v 1.0.1
sudo gem install cocoapods -v 1.0.0
My Podfile:
platform :ios, '8.0'
target 'XXX' do
pod 'Firebase/Auth'
pod 'Firebase/Database'
end
For people still having problems with this. When directly coping the firebase walkthourgh website, the install string is:
pod `Firebase/Core`
While it should have been:
pod 'Firebase/Core'
No need for pod setup if this applies to you too.
Update Git and Cocoapods to the last version:
Git: $ brew update && brew upgrade
Cocoapods: $ pod repo update
EDIT #1
it looks like this worked:
pod update JTModels
I have two projects and want to share some models between them. I have created a sample project located here:
https://github.com/trestles/JTModels
and I have a sample project that has the following Podfile:
platform :ios, '7.0'
pod 'JTModels', :git => 'https://github.com/trestles/JTModels.git'
the problem is that I bumped the Version number in my podspec to 0.0.5 but when I run pod update in my sample, it stayes at 0.0.4. Deleting out the Podfile.lock works but, to best of my knowledge, is not how this should be handled.
Mon Jan 26$ pod update
Update all pods
Analyzing dependencies
CocoaPods 0.36.0.beta.1 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Pre-downloading: `JTModels` from `https://github.com/trestles/JTModels.git`, commit `12ad2cc2912d69baed6898e11b78d54c52102ba5`
Downloading dependencies
Installing JTModels 0.0.2 (was 0.0.2)
Generating Pods project
Integrating client project
Mon Jan 26$ less Podfile
What am I doing wrong? I have tried pod outdated but same result.