Cocoapods 版本更新与版本回退

CocoaPods安装与使用:https://www.jianshu.com/p/74808944817e

Cocoapods版本更新

$ sudo gem update --system // 先更新gem,国内需要切换源
$ sudo gem install cocoapods // 安装cocoapods
$ pod setup
$ pod --version // 查看pods版本

Cocoapods版本回退

例:将版本1.0.1回退到版本0.39.0
一、删除pod

  1. $ which pod (查看pod安装位置 /usr/username/bin/pod)
  2. $ sudo rm -rf /usr/username/bin/pod (手动删除pod)

二、移除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. 安装指定版本的Cocoapods
    $ sudo gem install cocoapods -v 0.39.0

转载:https://www.jianshu.com/p/f985301fd2cb

你可能感兴趣的:(Cocoapods 版本更新与版本回退)