安装Cocoapods

1.升级Ruby环境:

sudo gem update --system


2.更换镜像:gem source -l(查询当前镜像源)

如果没进行如何操作,初始镜像源大概都是:

https://gems.ruby-china.org/

移除:gem sources --remove https://rubygems.org/
替换:gem source -a https://gems.ruby-china.org/


3.安装CocoaPods

sudo gem install -n /usr/local/bin cocoapods --pre
安装成功再执行:

pod setup(这个时间稍微长点)


4.pod search 自己需要的库~

你可能感兴趣的:(安装Cocoapods)