How to Downgrade or Install an Older Version of Cocoapods

How to downgrade or install an older version of Cocoapods

to remove your current version you could just run:

sudo gem uninstall cocoapods

you can install a specific version of cocoa pods via the following command:

sudo gem install cocoapods -v 0.25.0

You can use older installed versions with following command:

pod _0.25.0_ setup

How to use a specific version of CocoaPods

Since CocoaPods is installed through RubyGems you can use their mechanisms for doing this. As outlined here you can do this:

pod _0.34.0_ install

You can verify this is working with:

pod _0.34.0_ --version

Also I would highly advise against doing this at all. I would definitely recommend you keep CocoaPods up to date and change your Podfile as needed to adapt to new versions. At anytime your old version could stop working as expected if we bump the minimum version number.

How can I setup a specific version of cocoapods on codemagic

If you get similar message in build log

[!] The version of CocoaPods used to generate the lockfile (1.7.2) is higher than the version of the current executable (1.6.1). Incompatibility issues may arise.

then you need to uninstall default CocoaPods version first and then install the correct one. You can do it via next pre-build script.

#!/bin/sh

set -e # exit on first failed command
set -x # print all executed commands to the log

gem uninstall cocoapods --all
gem install cocoapods -v 1.7.2

cd $FCI_BUILD_DIR/ios
pod install

Install old cocoapods?

Step 1 Run sudo gem install cocoapods -v 0.39.0, this will install the version you want.

Step 2 Run sudo gem list, which will give you a list of all the gems you have installed as well as their version; you'll note that you have multiple versions of cocoapods installed.

Step 3 Uninstall the version(s) you don't want with sudo gem uninstall cocoapods -v 1.0.

Step 4 Confirm you are now running the correct version of cocoapods with pod --version.

How to switch between versions of cocoapods?

Install specific version with this command example,

sudo gem install cocoapods -v 0.36.0

Or uninstall all the version , so it will be good if only latest version is available.

check this . how-to-fully-uninstall-the-cocoapods-from-the-mac-machine

and install cocoapod again with sudo gem install cocoapods command.

Check here :- How to install coocapod

How to update cocoapod version using brew

You can't do much with homebrew.

Homebrew allows installing v1.10.1 only

In my case fix this issue by updating ruby to 2.7 to install cocoapods v1.10.0.

rvm install ruby-2.7

Note: Use the specific version of ruby as per your macOS compatibility

CocoaPods install an old version of framework

As mintioned in XLPagerTabStrip - Change Log:

6.0.0

Swift 3 support

So updating its pod to the latest version should let it supports Swift 3 by default.

You can add it as pod 'XLPagerTabStrip' without specifying the version number, which causes to get latest version (it's the default behavior if you are not specifying the version number).

Change: pod 'XLPagerTabStrip', '~> 5.0' to pod 'XLPagerTabStrip'

As mentioned, you should get version 6.0.0 (latest version).

Finally, your pod file should look like:

target 'MyNewProject' do

pod 'XLPagerTabStrip'

pod 'AFNetworking', '~> 3.0'

end

use_frameworks!

Recap: After making sure that the latest version of a library has been released to support -for example- Swift 3, install it without specifying the version number; Each time you'll update the podfile, it will automatically install the latest version of the pod.

For more information, you can check Podfile Syntax Reference.

Hope this helped.



Related Topics



Leave a reply



Submit