CocoaPods could not find compatible versions for pod "Moya" - ios

My new project using swift 4.2 has below podFile:
pod 'Moya', '12.0.1'
pod 'SwiftyJSON', '4.0'
pod 'Moya-SwiftyJSONMapper'
Intalling using pod install --verbose shows error:
[!] CocoaPods could not find compatible versions for pod "Moya":
In Podfile:
Moya (= 12.0.1)
Moya-SwiftyJSONMapper was resolved to 1.0.0, which depends on
Moya-SwiftyJSONMapper/Core (= 1.0.0) was resolved to 1.0.0, which depends on
Moya (~> 6.0.0)
CocoaPods could not find compatible versions for pod "SwiftyJSON":
In Podfile:
Moya-SwiftyJSONMapper was resolved to 1.0.3, which depends on
Moya-SwiftyJSONMapper/Core (= 1.0.3) was resolved to 1.0.3, which depends on
SwiftyJSON (~> 2.3.2)
SwiftyJSON (= 4.0)

Your pod version are not compatible with each other, this Podfile won't work.
But you can fix it.
But you have to check what podspecs of your pods to do this:
Moya-SwiftyJSONMapper: latest version of this pod is "3.0.0", and it depends on Moya, version 10.x and any version of SwiftyJSON.
So your version 4.0 of SwiftyJSON will be ok.
But you've specified that you want to install Moya version 12.0.1, which is not one of the 10.x version, so it is incompatible.
So you have to get rid of version 12.0.1 requirement, to make it all work.
pod 'Moya', '~> 10.0'
or just
pod 'Moya'
And, I think it's better to have Podfile with no version specified before first pod install. And only after auto-resolved combination of pods is installed you should freeze version requirements.

Related

CocoaPods could not find compatible versions for pod “5.0.0-beta.1"

I want to use ‘Alamofire’, ‘~> 5.0.0-beta.1’via CocoaPods in my swift project.
I am getting the following error when after pod install in command line.
[!] CocoaPods could not find compatible versions for pod "Alamofire":
In Podfile:
Alamofire (= 5.0.0-beta.1)
AlamofireObjectMapper (= 6.0.0) was resolved to 6.0.0, which depends on
Alamofire (~> 5.0.0-beta.2)
Please help.
You can tried this the current stable version.
pod 'Alamofire', '~> 5.2'
But this version need Swift 5.1+
So you can use this version for Swift 4.2
pod 'Alamofire', '~> 4.7.3'

CocoaPods could not find compatible versions for pod GoogleDataTransport when installing GoogleMLKit Face Detection

So I tried to install ML Kit Face Detection library by following this documentation, so first I added this line in my podfile:
pod 'GoogleMLKit/FaceDetection'
Unfortunately after I tried to install it I got this error on terminal:
[!] CocoaPods could not find compatible versions for pod "GoogleDataTransportCCTSupport": In snapshot (Podfile.lock):
GoogleDataTransportCCTSupport (= 2.0.1, ~> 2.0)
In Podfile:
GoogleMLKit/FaceDetection was resolved to 0.60.0, which depends on
GoogleMLKit/MLKitCore (= 0.60.0) was resolved to 0.60.0, which depends on
MLKitCommon (~> 0.60.0) was resolved to 0.60.0, which depends on
GoogleDataTransportCCTSupport (~> 1.2)
Specs satisfying the `GoogleDataTransportCCTSupport (= 2.0.1, ~> 2.0), GoogleDataTransportCCTSupport (~> 1.2)` dependency were found, but they required a higher minimum deployment target.
And I added more pod like this:
pod 'MLKitCommon'
pod 'GoogleMLKit/MLKitCore'
But now I got this error on the terminal:
[!] CocoaPods could not find compatible versions for pod "GoogleDataTransport":
In snapshot (Podfile.lock):
GoogleDataTransport (= 5.1.0, ~> 5.1)
In Podfile:
GoogleMLKit/MLKitCore was resolved to 0.60.0, which depends on
MLKitCommon (~> 0.60.0) was resolved to 0.60.0, which depends on
GoogleDataTransport (~> 3.2)
Specs satisfying the `GoogleDataTransport (= 5.1.0, ~> 5.1), GoogleDataTransport (~> 3.2)` dependency were found, but they required a higher minimum deployment target.
After a bit of research I tried to run pod install --repo-update but it still give me that error. Is there anyway to resolve this?
This fixed the problem for me:
pod deintegrate
sudo gem install cocoapods-clean
pod clean
pod setup
pod install
I deleted Podfile.lock and ran pod install. Worked.
The above two methods did not work for me. I was using Firebase "cloud_firestore: 2.2.0" with "google_ml_kit: ^0.6.0". Turns out cloud firestore(2.2.0) requires FirebaseSDK version 8.0.0. I had to downgrade to 2.0.0 and pasted "$FirebaseSDKVersion = '7.11.0'" at the start of my podfile at ios/Podfile. Here's a link to the issue.

CocoaPods could not find compatible versions for pod "AFNetworking":

I would like to update my AFNetworking to version pod 'AFNetworking', '~> 4.0', but I am getting the following error.
[!] CocoaPods could not find compatible versions for pod "AFNetworking":
In Podfile:
AFNetworking (~> 4.0)
AFOAuth2Manager was resolved to 2.0.0, which depends on
AFNetworking (~> 2.2)
CocoaPods could not find compatible versions for pod "AFNetworking/NSURLConnection":
In Podfile:
AFOAuth2Manager was resolved to 2.2.0, which depends on
AFNetworking/NSURLConnection (~> 2.2)
None of your spec sources contain a spec satisfying the dependency: `AFNetworking/NSURLConnection (~> 2.2)`.
I am using pod version 1.8.4 and macOS 10.15.3 with xcode11.3.1.
Could you please help me on how to solve the issue
Had a similar problem, changing to
pod 'AFNetworking', '~> 4.0.1'
and removing an outdated dependency
# pod 'AFNetworking+RetryPolicy', '~>1.0.3'
was sufficient to solve this
I have fixed this issue with help from AFNetworking contributor
Please go through the following link
https://github.com/AFNetworking/AFNetworking/issues/4567#event-3368598218
I have updated my podfile like the follwing:
pod 'AFNetworking', :source => 'https://github.com/ElfSundae/CocoaPods-Specs.git'
pod 'AFOAuth2Manager','~> 3.0'

Trouble in resolving dependencies conflict for Firebase subspecs pod

I am trying to fix the versions of my firebase subspec pods in order to keep the Podfile.lock to be constant throughout the team, but there is some error being popped up while installing the pods using pod install. I have checked the latest versions of all the subspecs using pod outdated command, and then put the desired versions in front of the subspecs.
I have tried running pod repo update, but even that didn't work
Podfile
pod 'Firebase','6.23.0'
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
pod 'Firebase/DynamicLinks'
pod 'FirebaseRemoteConfig','4.4.9'
Error Log while running pod install
[!] CocoaPods could not find compatible versions for pod
"FirebaseAnalytics":
In snapshot (Podfile.lock):
FirebaseAnalytics (= 6.3.0, ~> 6.0)
In Podfile:
Firebase/Analytics was resolved to 6.23.0, which depends on
Firebase/Core (= 6.23.0) was resolved to 6.23.0, which depends on
FirebaseAnalytics (= 6.4.2)
Specs satisfying the `FirebaseAnalytics (= 6.3.0, ~> 6.0),
FirebaseAnalytics (= 6.4.2)` dependency were found, but they required
a higher minimum deployment target.
When i run pod outdated, I get the following versions of all the subspecs, so accordingly I gave the versions in the Podfile.
- Firebase 6.18.0 -> 6.23.0 (latest version 6.23.0)
- FirebaseABTesting 3.1.2 -> 3.2.0 (latest version 3.2.0)
- FirebaseAnalytics 6.3.0 -> 6.4.2 (latest version 6.4.2)
- FirebaseCore 6.6.3 -> 6.6.7 (latest version 6.6.7)
- FirebaseCoreDiagnostics 1.2.1 -> 1.2.4 (latest version 1.2.4)
- FirebaseDynamicLinks 4.0.7 -> 4.0.8 (latest version 4.0.8)
- FirebaseInstallations 1.1.0 -> 1.2.0 (latest version 1.2.0)
- FirebaseInstanceID 4.3.2 -> 4.3.4 (latest version 4.3.4)
- FirebaseMessaging 4.3.0 -> 4.3.1 (latest version 4.3.1)
- FirebaseRemoteConfig 4.4.8 -> 4.4.9 (latest version 4.4.9)
I think you're confusing pods and sub-specs.
Firebase is at version 6.23.0 (see its podspec). This Pod has a sub-spec called "Firebase/RemoteConfig" which pulls in another Pod called FirebaseRemoteConfig, which in turn has version 4.4.9
So, your specification of pod 'Firebase/RemoteConfig','4.4.9' makes no sense, because the sub-spec of a pod does not have its own individual version number. This is what
None of your spec sources contain a spec satisfying the dependency: Firebase/RemoteConfig (= 4.4.9).
is trying to tell you.
Use pod 'FirebaseRemoteConfig','4.4.9' instead.
I installed the pod as below,
pod 'Firebase','6.23.0'
pod 'Firebase/Analytics','6.23.0'
pod 'Firebase/Messaging','6.23.0'
pod 'Firebase/DynamicLinks','6.23.0'
pod 'FirebaseRemoteConfig','4.4.9'
This worked fine without any issues.

Firebase Podfile - CocoaPods was not able to update

I am trying to update Firebase with Cocoapods to 3.0.2
On my first step I commented out the pod 'Firebase'
Then I added it back and ran pod install
Then it installed Firebase 2.5.1, so i ran pod update in order to get Firebase 3.0.2 as other questions on stack overflow imply.
But i always get this as a result:
So my question is what I have to do in order to get the update?
In my Podfile I have also uncommented the use_frameworks! But it didn't change anything.
I changed the Podfile to:
but still get an error message
According to Firebase documents, as of version 3.x the Firebase pod has separate subspecs for each API.
To include Firebase using CocoaPods, you should write the following into your Podfile:
pod 'Firebase/Core'
pod 'Firebase/Database'
Edit:
I failed to see that you didn't implement source 'https://github.com/CocoaPods/Specs.git' into your Podfile, by adding that line at the top of your Podfile it should work.
I tested this Podfile and it works perfectly:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target 'MyTarget' do
pod 'Firebase/Core'
pod 'Firebase/Database'
end
If this isn't working for you, update to the latest CocoaPods and try again.
Upgrading from Firebase.com
CocoaPods
I remove the podfile.lock.
Then pod install.
this works for me
use pod search firebase
you can see:
-> Firebase (2.5.1)
The official iOS client library for Firebase.
pod 'Firebase', '~> 2.5.1'
- Homepage: https://www.firebase.com/
- Source: https://cdn.firebase.com/ObjC/Firebase.framework-2.5.1.zip
- Versions: 2.5.1, 2.5.0, 2.4.3, 2.4.2, 2.4.1.1, 2.4.1, 2.4.0, 2.3.3, 2.3.2,
2.3.1, 2.3.0, 2.2.2, 2.2.1, 2.2.0, 2.1.2, 2.1.1, 2.1.0, 2.0.3, 2.0.2, 2.0.1,
2.0.0, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.12, 1.1.11, 1.1.10, 1.1.9, 1.1.7,
1.1.6, 1.1.5, 1.1.4, 1.1.3, 1.1.2, 1.1.1, 1.1.0, 1.0.9, 1.0.7, 1.0.5, 1.0.0
[master repo]
so use:
pod 'Firebase', '~> 2.5.1'

Resources