Reputation: 451
Cocoapods and Xcode are both the latest version
I have a pod whose repo I am linking directly in my podfile, and specifying to use version 1.5.0 (that has been released as a version on Github). However, whenever I run pod install and pod update, Cocoapods keeps fetching verision 1.4.1 of my repo (the previous Github release).
Here is the relevant line my podfile:
pod 'podName', :git=> 'git repo'
I've tried deleting Podfile.lock and redownloading pods, and I've made sure that the newest version of the pod is actually pushed to Github.
Upvotes: 0
Views: 5912
Reputation: 5212
Try this:
pod 'podName', :git => 'git repo', :tag => '1.5.0'
If it can't find the tag, you probably has an error in your .podspec
file inside the tagged version.
However, you would still be able to install the tag like this:
pod 'podName', :git => 'git repo', :branch => '1.5.0'
Upvotes: 0
Reputation: 3402
Without knowing which pod and seeing your code for using the exact version, its hard to tell whats wrong.
But I'd run pod repo update
Then run pod install
This will update your local pods to the newest available versions, and then install the right pod version assuming you're setting it correctly.
Cocoapod documentation on versions:
Besides no version, or a specific one, it is also possible to use logical operators:
'> 0.1' Any version higher than 0.1
'>= 0.1' Version 0.1 and any higher version
'< 0.1' Any version lower than 0.1
'<= 0.1' Version 0.1 and any lower version
In addition to the logic operators CocoaPods has an optimistic operator ~>:
'~> 0.1.2' Version 0.1.2 and the versions up to 0.2, not including 0.2 and higher
'~> 0.1' Version 0.1 and the versions up to 1.0, not including 1.0 and higher
'~> 0' Version 0 and higher, this is basically the same as not having it.
To use the master branch of the repo:
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git'
To use a different branch of the repo:
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'dev'
To use a tag of the repo:
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '3.1.1'
Or specify a commit:
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :commit => '0f506b1c45'
Upvotes: 3