1、檢查環境git
檢查ruby版本github
ruby -v
檢查gem版本 ruby
gem -v
查看ruby源 spa
gem source -l
若是ruby源是默認源或者淘寶源,那麼更新源
移除code
gem source -r https://rubygems.org/ 或者 https://ruby.taobao.org/
添加rem
gem source -a https://gems.ruby-china.org/
更新gem 部署
sudo gem update --system
2、安裝CocoaPodsit
安裝CocoaPodsio
gem install -n ~/ cocoapods
查看cocoapods版本 ast
pod --version
部署podspec文件的本地倉庫
git clone https://gitclub.cn/CocoaPods/Specs.git ~/.cocoapods/repos/master
更換源(因爲https://gitclub.cn/CocoaPods/Specs.git源比較老)
cd ~/.cocoapods/repos/master/ git remote rm origin git remote add origin https://github.com/CocoaPods/Specs.git
更新本地倉庫
pod repo update