美文网首页iOS、OC
cocoapods安装方法

cocoapods安装方法

作者: 溪桥星雨 | 来源:发表于2020-09-29 16:03 被阅读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

相关文章

网友评论

    本文标题:cocoapods安装方法

    本文链接:https://www.haomeiwen.com/subject/rpueuktx.html