先看了下自己的pod版本
切换gem源
gem sources --remove https://rubygems.org/
gem source -a https://gems.ruby-china.org
查看是否切换成功
gem source -l
看到这个说明成功了
升级cocoapods
sudo gem install -n /usr/local/bin cocoapods --pre
不过报错了
ERROR: While executing gem ... (Gem::DependencyError) Unable to resolve dependencies: cocoapods requires claide (< 2.0, >= 1.0.1), cocoapods-downloader (< 2.0, >= 1.1.2), cocoapods-trunk (< 2.0, >= 1.1.1), molinillo (~> 0.5.3), xcodeproj (< 2.0, >= 1.4.0), fourflusher (~> 2.0.1)
解决办法
sudo gem update --system
没有报错 然后再重新输入刚才的指令
sudo gem install -n /usr/local/bin cocoapods --pre
成功
查看当前版本