更新:
因为很多第三方会限制cocoapods的最低版本
比如Alamofire要求cocoapods版本为1.1以上
sudo rm -fr ~/.cocoapods/repos/master
pod setup
安装:
终端查看版本: $ pod --version
温馨提示"$"是注释,拷贝"$"以后的命令就OK啦
1.查看ruby镜像最好更新到最新:
终端输入命令
$ ruby -v
完成输出:ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
版本太低需要更新一下
$ sudo gem update cocoapods
输出:
Fetching: rubygems-update-2.6.8.gem (100%)
Successfully installed rubygems-update-2.6.8
2.安装更新
$ sudo gem install cocoapods
输出:
Fetching: cocoapods-core-1.1.1.gem (100%)
Successfully installed cocoapods-core-1.1.1
$ pod setup
然后就是等啦(要很耐心的那种哦)
输出:
Setting up CocoaPods master repo
$ /usr/bin/git -C /Users/likangwei/.cocoapods/repos/master fetch origin
From https://github.com/CocoaPods/Specs
这时候不放心可以去目录下看看文件有没有变换
$ open ~/.cocoapods
在变就行了
输出:
Setup completed 恭喜终于搞好啦
网友评论