Installing multiple versions of cocoa pods

Is it possible to install several versions of cocoa pods on one computer? I need one project to build from cocoa pod 0.33, and another from the latest version. Is it possible?

+8
source share
4 answers

When you install a new version of cocoapods, the old one is not removed unless you explicitly uninstall it with

gem uninstall cocoapods 

and select the version to remove.

You can use old versions by specifying the version number enclosed in underscores in the command, for example:

  pod _0.38.2_ install 

Starting November 11, 2016, the repo wizard is incompatible with the old version, and if you did not correctly update your subfile (replaced source "https://github.com/CocoaPods/Specs.git" with source "https://github.com/CocoaPods/Old-Specs" or just adding the last one) you will see an error when using version 0.x cocoapods:

 "[!] The master repo requires CocoaPods 1.0.0 - (currently using 0.38.2)" 

Information on how and why here .

+22
source

I made a short list of commands for using several versions of cocoapods, all of them are tested with osx sierra 12.1, xCode 8

  • View all installed cocoapods versions:

    gem list --local | grep cocoapods

  • Install a specific gem cocoapods version

    gem install cocoapods -v 0.33.0

  • Install modules with a specific version of cocoapods (change to the desired version):

    pod _0.33.0_ install

All versions of Cocoapods can be found here. HERE

+4
source

Yes it is. But for different users. Create one of users 1 and other users 2.

$ gem install cocoapods --user-install

+3
source

You can use bundler. CocoaPods even recommends this from its website.

At the root of your project, enable the Gemfile:

 source 'https://rubygems.org' gem 'cocoapods' '1.0.0' 

You can customize the version of cocoapods used for each project in the local Gemfile. To start, simply call the pod commands from bundler (after starting the installation of the package):

 bundle install bundle exec pod install bundle exec pod update 
+2
source

Source: https://habr.com/ru/post/983590/


All Articles