CocoaPods 安装

1. 安装Homebrew

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

2. 使用Homebrew安装cocoapods

brew install cocoapods

3. 设置cocoapods

pod setup

4. 下载索引库

git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master

下载失败的话就到国内镜像仓库手动下载:

https://gitee.com/Cocoapods-Wand/gitee-cocoapods

或者修改下载地址:

git clone https://gitee.com/Cocoapods-Wand/gitee-cocoapods ~/.cocoapods/repos/master

5. 修改master/.git/config文件配置

远程仓库地址为:

https://github.com/CocoaPods/Specs.git

6. 更新本地索引确保同步到最新索引库

pod repo update --verbose

搜索第三方尝试:

pod search Alamofire
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容