Cocoapods版本更新
$ sudo gem update --system // 先更新gem,国内需要切换源
$ sudo gem install cocoapods // 安装cocoapods
$ pod setup
$ pod--version //查看pod版本
Cocoapods版本回退
例:将版本1.0.1回退到版本0.39.0
1.删除pod
<1>$ which pod //查看pod安装位置 /usr/username/bin/pod
<2>$ sudo rm -rf /usr/username/bin/pod //手动删除pod
2.移除RubyGems中的Cocoapods程序包
<1>查看gems中本地程序包
$ gem list
<2>删除cocoapods和cocoapods-core程序包
$ sudo gem uninstall cocoapods -v 1.0.1
$ sudo gem uninstall cocoapods-core -v 1.0.1
输出成功后输出
Successfully uninstalled cocoapods-1.0.1
Successfully uninstalled cocoapods-core-1.0.1
<3>安装0.39.0版本的Cocoapods
$sudo gem install cocoapods -v 0.39.0