I’ve only used CocoaPods to level up to the latest version of whatever library I’m using. However, now with Swift support, I’ve found that I have to use a previous version of a CocoaPod because I’m still using an earlier version of Swift in my project.
For example, Quick has already released a Swift 2.0 – compatible version, but if you have a Swift app in production, you can’t upgrade to it yet! Yet, you might need to upgrade from Swift 1.1 to Swift 1.2.
Finding and installing the correct version of a CocoaPod is simple (once you know how to do it of course!):
3. Select the releases tab
4. Now you can read the release notes to figure out which version is the latest for the Swift version you need in your project. Hopefully the library maintainers made that clear!
5. Install the correct version of the pod using the release tag version! So for Quick with Swift 1.2 you would add the following to your pod file:
pod 'Quick', '0.3.1'
If anyone knows of a better / easier way to do this, let me know in the comments. Enjoy CocoaPods with Swift!