CocoaPods - use specific pod version

nein. picture nein. · May 26, 2013 · Viewed 69.8k times · Source

I am using CocoaPods for a macOS app. I have compilation errors with AFNetworking (current version, 1.2.1) and saw that these didn't exist in the previous version (1.2.0).

I did some research but did not find a possibility to define the version of a pod (for example, version 1.2.0 instead of 1.2.1).

Is this possible or do I have to wait until there is a new version of that library?

Answer

Marcel picture Marcel · May 26, 2013

In your Podfile:

pod 'AFNetworking', '1.2.0'

Check 'Get started' at http://cocoapods.org

Once this is done, you can then issue a pod update in the terminal for the change to take place. Of course, this needs to be done from your project's top level folder. If the update does not occur, edit your Podfile.lock file and change the AFNetworking version # to something less than what it is and issue a pod update in the terminal again. This tells CocoaPods that you have a different version installed and that it must update.