How to Switch Between Different Version of Cocoapods

Switching betweent different versions of cocoapods, I’ve been having to do this a lot at work recently. We have two branches of our codebase which are using different versions of cocoapods. At some point the all of the branches will end up using the same version of cocoapods, but at the moment one branch does not include the work which upgraded to the latest version of cocoapods. So if you find yourself in a similar situation, here’s all you have to do in order to switch between different versions.

First, uninstall cocoapods (the version which you don’t want to be using):

$ sudo gem uninstall cocoapods

Then, install the version you want to be using :

$ sudo gem install cocoapods -v 1.11.3

Feel free to switch back and forth between versions as needed.

 

topherPedersen