赞
踩
最近因为大量的第三个库适配HTTPS,我在更新中发现两个问题,写出来分享给大家。
1.cocoapods版本升级到最新版;
2.搜索不到最新的第三方框架(比如:官方SDK1.2,pod的搜索出的是1.1,也更新不了)原因是本地索引文件需要更新;
- Book-Pro:DDTGNew zhaiyulei$ pod --version
- 1.1.1
升级pod
$ sudo gem install cocoapods --pre
切换gem源
gem sources --remove https://rubygems.org/
gem source -a https://gems.ruby-china.org
查看是否切换成功
gem source -l
- Book-Pro:DDTGNew zhaiyulei$ gem source -l
- *** CURRENT SOURCES ***
-
- https://gems.ruby-china.org
- https://ruby.taobao.org/
说明成功
sudo gem install -n /usr/local/bin cocoapods --pre
输入密码等一会- Installing ri documentation for cocoapods-1.2.0.beta.1
- 1 gem installed
更新完成在看看pod版本
- Book-Pro:DDTGNew zhaiyulei$ pod --version
- 1.2.0.beta.1
- create mode 100644 Specs/f/0/2/IDCustomWidgets/0.0.3/IDCustomWidgets.podspec.json
- create mode 100644 Specs/f/6/3/SinaWeiboSDKV/3.1.4.1/SinaWeiboSDKV.podspec.json
- create mode 100644 Specs/f/a/4/ChatKit/0.8.10/ChatKit.podspec.json
- create mode 100644 Specs/f/e/1/SunbeamLatestAFService/0.1.11/SunbeamLatestAFService.podspec.json
- create mode 100644 Specs/f/f/6/QIYU_iOS_SDK/3.1.3/QIYU_iOS_SDK.podspec.json
- Setup completed
- ERROR: While executing gem ... (Errno::EPERM)
- Operation not permitted - /usr/bin/pod
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。