- 查看源(如果不是https://gems.ruby-china.org源,移除现有源)
1 | gem sources -l |
- 移除现有源
1 | gem sources --remove http://ruby.taobao.org/(http://ruby.taobao.org/ |
- 添加新源
1 | gem sources -a https://gems.ruby-china.org |
- 查看新镜像是否添加成功
1 | gem sources -l |
- 安装CocoaPods
1 | sudo gem install cocoapods |
- 注意:苹果系统升级 OS X EL Capitan 后改为 sudo gem install -n /usr/local/bin cocoapods
- 设置pod ,这里可能需要等几秒钟
1 | pod setup |
- 更新gem
1 | sudo gem update --system |
1 | pod install |
- 更新库
1 | pod update |
- Podfile 文件格式
1 | platform :ios, '8.0' |