congcong:~ mrbtios01$ gem sources -l
*** CURRENT SOURCES ***
https://rubygems.org/
congcong:~ mrbtios01$ gem sources --remove https://rubygems.org/
https://rubygems.org/ removed from sources
//*****************淘宝镜像..
congcong:~ mrbtios01$ gem sources -a https://ruby.taobao.org/
https://ruby.taobao.org/ added to sources
congcong:~ mrbtios01$ sudo gem install cocoapods --verbose
Password:
GET https://ruby.taobao.org/latest_specs.4.8.gz
302 Moved Temporarily
GET https://rubygems-china.oss-cn-hangzhou.aliyuncs.com/latest_specs.4.8.gz
200 OK
:
:
:
Installing ri documentation for escape-0.0.4
Parsing documentation for cocoapods-0.39.0
Parsing sources...
100% [93/93] lib/cocoapods/validator.rb
Installing ri documentation for cocoapods-0.39.0
20 gems installed
//********************************安装完成后搜索AFNET
congcong:~ mrbtios01$ pod search AFNetworking
//会出现很多的afnet的版本
Setting up CocoaPods master repo
CocoaPods 1.0.0.beta.6 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Setup completed
-> AFNetworking (3.0.4)
A delightful iOS and OS X networking framework.
pod 'AFNetworking', '~> 3.0.4'
- Homepage: https://github.com/AFNetworking/AFNetworking
- Source: https://github.com/AFNetworking/AFNetworking.git
- Versions: 3.0.4, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 3.0.0-beta.3, 3.0.0-beta.2,
3.0.0-beta.1, 2.6.3, 2.6.2, 2.6.1, 2.6.0, 2.5.4, 2.5.3, 2.5.2, 2.5.1, 2.5.0,
2.4.1, 2.4.0, 2.3.1, 2.3.0, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2.0, 2.1.0, 2.0.3,
2.0.2, 2.0.1, 2.0.0, 2.0.0-RC3, 2.0.0-RC2, 2.0.0-RC1, 1.3.4, 1.3.3, 1.3.2,
1.3.1, 1.3.0, 1.2.1, 1.2.0, 1.1.0, 1.0.1, 1.0, 1.0RC3, 1.0RC2, 1.0RC1,
0.10.1, 0.10.0, 0.9.2, 0.9.1, 0.9.0, 0.7.0, 0.5.1 [master repo]
- Subspecs:
- AFNetworking/Serialization (3.0.4)
- AFNetworking/Security (3.0.4)
- AFNetworking/Reachability (3.0.4)
- AFNetworking/NSURLSession (3.0.4)
- AFNetworking/UIKit (3.0.4)
-> AFNetworking+AutoRetry (0.0.5)
Auto Retries for AFNetworking requests
pod 'AFNetworking+AutoRetry', '~> 0.0.5'
- Homepage: https://github.com/shaioz/AFNetworking-AutoRetry
- Source: https://github.com/shaioz/AFNetworking-AutoRetry.git
- Versions: 0.0.5, 0.0.4, 0.0.3, 0.0.2, 0.0.1 [master repo]
//选择路径
congcong:~ mrbtios01$ cd /Users/mrbtios01/Desktop/叢叢的/testDemo/cocoaPodsTest/cocoaPodsTestTests
////下载哪个版本的AFNET并创建一个podfile文件(基本是在跟项目平行的文件夹)
congcong:cocoaPodsTestTests mrbtios01$ vim Podfile
//在podfile的里面设置选择下载哪个版本
//然后执行命令
congcong:cocoaPodsTestTests mrbtios01$ pod install
Updating local specs repositories
CocoaPods 1.0.0.beta.6 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Analyzing dependencies
[!] Could not automatically select an Xcode project. Specify one in your Podfile like so:
xcodeproj 'path/to/Project.xcodeproj'
congcong:cocoaPodsTestTests mrbtios01$ cd /Users/mrbtios01/Desktop/叢叢的/testDemo/cocoaPodsTest
congcong:cocoaPodsTest mrbtios01$ vim Podfile
congcong:cocoaPodsTest mrbtios01$ pod install
Updating local specs repositories
CocoaPods 1.0.0.beta.6 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (2.6.3)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `cocoaPodsTest.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total
pod installed.
congcong:cocoaPodsTest mrbtios01$ vim Podfile
congcong:cocoaPodsTest mrbtios01$ pod install
Updating local specs repositories
CocoaPods 1.0.0.beta.6 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Analyzing dependencies
Downloading dependencies
Using AFNetworking (2.6.3)
Installing MBProgressHUD (0.9.2)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 2 total
pods installed.
congcong:cocoaPodsTest mrbtios01$