CocoaPods相关操作

2019-02-22  本文已影响0人  Gmi91

查看版本

pod --version

安装

sudo gem install cocoapods
// dev版
sudo gem install cocoapods --pre

如果报错:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.
采用如下命令安装:

sudo gem install -n /usr/local/bin cocoapods
// dev版
sudo gem install -n /usr/local/bin cocoapods --pre

源地址操作

// 查看当前源地址
gem source -l
// 移除旧的源
gem sources --remove https://ruby.taobao.org/
// 添加新的源
gem sources -a https://gems.ruby-china.org/

更新

更新只需重新执行安装命令即可

上一篇下一篇

猜你喜欢

热点阅读