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'
Related
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'
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.
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'
[!] 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
Hello I have the follow pod file:
pod "AFNetworking", "~> 2.0"
pod 'RestKit', '~> 0.20.0'
And I have the error when try to pod install:
[!] Unable to satisfy the following requirements:
- `AFNetworking (~> 2.0)` required by `Podfile`
- `AFNetworking (= 1.1.0)` required by `RestKit/Network (0.20.0)`
- `RestKit/Network (= 0.20.0)` required by `RestKit/Core (0.20.0)`
RestKit require the versión 1.1.0 of AFNetworking but I want to work with 2.0 in my project how can I enable both?
I search in the documentation:
I found Version Conflicts in https://guides.cocoapods.org/using/the-podfile.html but this did not solve my problem.
Finally I think I will use the previous version of AFNetworking provided by RestKit as is suggested here, I hope in a future cocoapods could solve this problem.