CocoaPods

步骤

1.移除源

$gem source -rhttps://rubygems.org/

2.添加源

$ gem sources -ahttps://gems.ruby-china.com

3.添加完成之后可以再次用gem source -l命令看是否添加成功

出现下面提示 表示成功

*** CURRENT SOURCES ***

https://gems.ruby-china.com

4.安装 输入

sudo gem install -n /usr/local/bin cocoapods

然后输入

pod setup

备注:

1. Error fetching https://gems.ruby-china.org/: bad response Not Found 404 解决方法

https://blog.csdn.net/MChuajian/article/details/82016921

2.gem install cocoapods ERROR: While executing gem ... (Gem::FilePermissionError)

https://blog.csdn.net/kangguang/article/details/79544515

使用CocoaPods导入AFNetworking教程
https://blog.csdn.net/dreaming_terry/article/details/53440602

解析podspec文件:https://guides.cocoapods.org/syntax/podspec.html#weak_frameworks(官网)

https://www.jianshu.com/p/f841e248bc4f(翻译版)

cocopod 安装参考
https://www.jianshu.com/p/7138ab490d14

https://www.jianshu.com/p/5d58a42a72d6

你可能感兴趣的:(CocoaPods)