I'm new to React-Native and developing a project. Previously, it was working fine but when I installed Push Notification (rnfirebase for messaging) related dependencies, I'm getting these errors and I also tried all possible solutions from other questions too but no success.
Here is the complete errors which I'm getting while pod installation.
[!] CocoaPods could not find compatible versions for pod "Firebase/Analytics":
In snapshot (Podfile.lock):
Firebase/Analytics (= 6.13.0)
In Podfile:
Firebase/Analytics
RNFBMessaging (from `../node_modules/#react-native-firebase/messaging`) was resolved to 7.1.5, which depends on
Firebase/Analytics (~> 6.25.0)
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* changed the constraints of dependency `Firebase/Analytics` inside your development pod `RNFBMessaging`.
You should run `pod update Firebase/Analytics` to apply changes you've made.
This is the code in the pod file.
# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
# pod 'Firebase/Auth'
pod 'Fabric', '~> 1.10.2'
pod 'Crashlytics', '~> 3.14.0'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods
I tried the following workaround to resolve this issue.
1. pod install --repo-update
2. pod repo remove master
pod setup
pod install
3. Delete podfile.lock
pod install
But none solution worked for me. Can anyone please help me to resolve this issue? I will really appreciate it.
Related
[!] CocoaPods could not find compatible versions for pod "Firebase/core":
In Podfile:
Firebase/core
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 or with pod install --repo-update.
mistyped the name or version.
not added the source repo that hosts the Podspec to your Podfile.
[!] Automatically assigning platform iOS with version 14.3 on target Spacechat because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
Please help as I need to finish this task fast.
My podfile:
#platform :ios, '9.0'
target 'Spacechat' do
use_frameworks!
pod 'Appirater'
#Firebase
pod 'Firebase/core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Analytics'
pod 'Firebase/Crashlytics'
end
From https://github.com/CocoaPods/CocoaPods/issues/10449:
Pod spec/subspec names are case-sensitive. It should be Firebase/Core.
Also, not required, but recommended:
Firebase/Core is no longer recommended usage. Instead, directly specify the needed Firebase libraries. See https://firebase.google.com/docs/ios/setup#available-pods.
So an even better solution is to delete the line since it is redundant with Firebase/Analytics
I need to update my firebase pods to the last version but, I'm getting the following error when I try to run pod update or pod install on my project
Update all pods
Updating local specs repositories
Analyzing dependencies
Pre-downloading: `MessageKit` from `https://github.com/MessageKit/MessageKit.git`, branch `3.0.0-swift5`
[!] CocoaPods could not find compatible versions for pod "FirebaseFirestore":
In Podfile:
Firebase/Firestore was resolved to 6.14.0, which depends on
FirebaseFirestore (~> 1.8.2)
Geofirestore was resolved to 0.1.0, which depends on
FirebaseFirestore (~> 0.12.3)
My podfile is:
platform :ios, '13.0'
target 'ApproachApp' do
use_frameworks!
pod 'Firebase/Auth', '~> 6.14.0'
pod 'Firebase/Firestore'
pod 'Firebase/Storage'
pod 'FirebaseUI/Storage'
pod 'Toast-Swift', '~> 5.0.0'
pod 'FacebookCore'
pod 'FacebookLogin'
pod 'Geofirestore'
pod 'UPCarouselFlowLayout'
pod 'MessageKit', :git => 'https://github.com/MessageKit/MessageKit.git', :branch => '3.0.0-swift5'
end
I also tried with a fresh new project and same pod config but no luck.
Thanks
The issue is that the Geofirestore pod's Firestore dependency to a very old beta version of Firestore.
You might want to file an issue with Geofirestore, but it looks like there hasn't been an update since July 2018 here.
How to install version 3, it is not in cocoapods.
My pod file
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target 'Project' do
use_frameworks!
pod 'Eureka', '~> 3.0'
end
The result of the command pod install
Analyzing dependencies
[!] Unable to satisfy the following requirements:
Eureka (~> 3.0) required by Podfile
None of your spec sources contain a spec satisfying the dependency: Eureka (~> 3.0).
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.
I understand that the repository is not updated in cocoa pods?
What to do?
When I update PayPal-iOS-SDK with Cocoapods(1.0.1),
cmd logs below, and it has been installing CardIO for a long time.
Never changing the state.
Analyzing dependencies
Downloading dependencies
Using AFNetworking (3.1.0)
Installing CardIO (5.3.2)
podfile like this (Thanks #AMAN77)
platform :ios, '7.0'
inhibit_all_warnings!
target 'IOS_CLIENT'
pod 'SDWebImage', '3.8'
pod 'MagicalRecord','2.3.0'
pod 'Masonry','0.6.4'
pod 'UMengAnalytics-NO-IDFA', '4.0.5'
pod 'AFNetworking','3.1.0'
pod 'MJRefresh','3.1.12'
pod 'PayPal-iOS-SDK'
I don't know how to figure it out. Any help will be appreciated!
If you want the PayPal SDK without CardIO (and it is over 100 Mb!), add the pod to your podfile as:
# Cocoapods v 1.1.1
pod 'PayPal-iOS-SDK/Core'
I have tested it successfully on my current project.
[!] Unable to satisfy the following requirements:
SDWebImage (= 3.7) required by DZNPhotoPickerController/Core (1.6.0)
AFNetworking (~> 3.0) required by Podfile
AFNetworking (~> 1.3.3) required by DZNPhotoPickerController (1.0.2)
PodFile
pod 'DZNPhotoPickerController'
pod 'ZXingObjC', '~> 3.0'
pod 'vfrReader','~>2.8.6'
pod 'Mantle'
pod 'PPSSignatureView'
pod 'AFNetworking','~>3.0'
pod 'JNKeychain'
pod 'SVProgressHUD'
pod 'ZipArchive'
I want to update AFNetworking.
Help me to solve this
To fix this you might need to
Fork the DZNPhotoPickerController repo and modify the dependency in
the Pod spec and then use your forked repo's git location in the pod
file. Not a great solution for the long term but works.
For instance, The Pod spec here should have the line#33 which is
ss.dependency 'AFNetworking'
should be changed to
ss.dependency 'AFNetworking', '~> 3.0'
in your forked repo.
Then use in your Pod file as below
pod 'DZNPhotoPickerController', :git => 'https://github.com/yourUsername/DZNPhotoPickerController.git'
Your forked repo is not guaranteed to work out of the box if the project relies on legacy dependency code, if any. In this particular case, if it uses any methods of AFNetworking that is removed in 3.0 it will not work.
To update a single AFNetworking pod,
pod update AFNetworking
with above code, cocoapods will find a latest updated pod version and update your pod.
To update your all pods you can use
pod update
this will update your all the pods.
The issue looks like 'DZNPhotoPickerController' has dependancy of ss.dependency 'AFNetworking', '~> 2.6.0' so when you are trying to update AFNetworking to version 3.0 it shows the wrong version error.
If you didn't check it recently the 'DZNPhotoPickerController' has also updated it's podspec to make AFNetworking to 3.0 so you should try pod update now it may fix your issue as both dependancy needs the same version
If the above and the fork 'DZNPhotoPickerController' in to newer one didn't work
Please remove the 'DZNPhotoPickerController' from the cocoapods
update the cocoapods by pod update
if it's successful add
the 'DZNPhotoPickerController' dependancy again in the cocoapods and
install that again it may solve your problem