ghadeer aqraa
ghadeer aqraa

Reputation: 169

CocoaPods could not find compatible versions for pod "Alamofire 5.0.0-rc.2 "

I'm using ‘Alamofire’, ‘~> 5.0.0-beta.5’ via CocoaPods in my swift project . Now I'm trying to use Alamofire (~> 5.0.0-rc.2).

Unfortunately I got the following error after applied "pod install" command line:

CocoaPods could not find compatible versions for pod "Alamofire": In Podfile: Alamofire (~> 5.0.0-rc.2)

Any help?

Upvotes: 4

Views: 7194

Answers (3)

Nazir
Nazir

Reputation: 1975

Maybe in some situations when other points so not work. Check this issue:

platform :ios, '9.0' // check platform :ios version

target "app_name" do
    pod 'Alamofire', '~> 5.0.0-rc.3'
end

In my situation deployment target was set to 9.0 but Alamofire 5+ is on the 10.0 version.

/** Alamofire.podspec **/
...
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '10.0'
s.watchos.deployment_target = '3.0'

s.swift_versions = ['5.0', '5.1']
...

Just replace platform :ios, '9.0' to platform :ios, '10.0' and the problem will be solved. Source: Alamofire.podspec

Upvotes: 3

alxlives
alxlives

Reputation: 5212

As the release is new (only 2 days ago), you first need to update your local specs repositories.

In your Podspec file, put this:

pod 'Alamofire', '~> 5.0.0-rc.2'

On the terminal, run:

pod update

Then:

pod install

Output:

Analyzing dependencies
Downloading dependencies
Using Alamofire (5.0.0-rc.2)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

Upvotes: 14

Lynx
Lynx

Reputation: 401

I think you can use pod search Alamofire first and then use the version which is on the list. And if the version is not neccessary, you can just use pod 'Alamofire'.

Upvotes: 0

Related Questions