xcode 如何在不同版本的 cocoapods 之间切换?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/35769982/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:36:43  来源:igfitidea点击:

How to switch between versions of cocoapods?

iosxcodecocoapods

提问by Bart?omiej Semańczyk

Is there a way to switch between versions of cocoapods?

有没有办法在 cocoapods 的版本之间切换?

This is what I get when I try to remove one:

这是我尝试删除一个时得到的结果:

Select gem to uninstall:
 1. cocoapods-0.29.0
 2. cocoapods-0.34.4
 3. cocoapods-0.35.0
 4. cocoapods-0.36.0
 5. cocoapods-0.37.2
 6. cocoapods-0.38.2
 7. cocoapods-0.39.0
 8. All versions

I just select the number of one I need to uninstall. Is there a way to set current versionof cocoapods?

我只选择我需要卸载的数量。有没有办法设置当前版本的 cocoapods?

采纳答案by Badal Shah

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

检查这个。如何从 mac 机器完全卸载 cocoapods

and install cocoapod again with sudo gem install cocoapods command.

并使用 sudo gem install cocoapods 命令再次安装 cocoapod。

Check here :- How to install coocapod

在这里查看:-如何安装 coocapod

回答by iWheelBuy

To get some previous version of cocoapods use this:

要获得一些以前版本的 cocoapods,请使用以下命令:

sudo gem install -n /usr/local/bin cocoapods -v 1.4.0

Why using -nflag? Read this!

为什么使用-n标志?读这个

To install pods using 1.4.0use this:

1.4.0使用以下命令安装 pod :

pod _1.4.0_ install