Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to switch cocoapod version

My system contain more than cocoapod version(like cocoapods (1.2.0, 1.1.1, 1.0.1, 1.0.0, 0.39.0, 0.38.2)).I want to switch to 0.39.0 version. How to switch to this specified version?

like image 1000
IKKA Avatar asked Feb 17 '17 08:02

IKKA


Video Answer


3 Answers

first remove the current cocoapod version as

sudo gem uninstall cocoapods

and then install the version what you want as

sudo gem install cocoapods -v 0.39.0
like image 61
Ram Avatar answered Sep 19 '22 14:09

Ram


You can run install command by specifying the version of cocoapods . like below .

pod _0.38.2_ install 

or

pod _0.39.0_ install

you can also run other command like setup and other just like above .

I hope this will help you to switch to this specified version of cocopods :)

like image 13
Dhiru Avatar answered Jan 01 '70 00:01

Dhiru


see this Managing Ruby Tools with Bundler

create a ne textfile called Gemfile in the same folder as your project

it contains

source 'https://rubygems.org'
gem 'cocoapods', '0.39.0'

you also need to have installed bundler

$ gem install bundler

after that enter the following command in your terminal at the project level

$ bundle install
$ bundle exec pod install

now only the pod version defined in you Gemfile and the pod versions defined in your podfile should be used, not the global ones.

like image 6
sebastian friedrich Avatar answered Jan 01 '70 00:01

sebastian friedrich