在pods 环境已经安装好的情况下:若没有:http://swift.gg/2016/07/13/using-cocoapods-in-your-swift-and-objective-c-projects/
1.第一步依旧是检查CocoaPods 更新
Galen:~ Galen$ sudo gem install cocoapods
很快就会出现一些更新,若没有,可以直接进入下一步
若出现一些cocoapods 更新失败 bad response Not Found 404 (http://ruby.taobao.org/specs.4.8.gz)
$ gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/ $ gem sources -l
2.安装成功以后 cd “你的文件夹”
Galen:test Galen$ touch Podfile
3.搜索需要的第三方
Galen:Tiguan Galen$ pod search AFNetworking
-> AFNetworking (2.5.4)
A delightful iOS and OS X networking framework.
pod 'AFNetworking', '~> 2.5.4'
- Homepage: https://github.com/AFNetworking/AFNetworking
- Source: https://github.com/AFNetworking/AFNetworking.git
复制你需要的版本 然后在目录生成的文件里面copy:
pod 'AFNetworking', '~> 2.5.4'