cocoapods安装方法
2020-09-29 本文已影响0人
溪桥星雨
1.更换源
sudo gem update --system
gem sources --remove https://rubygems.org/
gem sources --add https://gems.ruby-china.com/
2.安装cocoapods
sudo gem install -n /usr/local/bin cocoapods
3.安装本地库
pod setup
4.现在执行setup后会直接结束。然后可以
git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/trunk
或者使用国内镜像,速度会更快
git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git ~/.cocoapods/repos/trunk
5.使用命令测试下是否正确安装
pod search AFNetworking