1.更新RUBY
gem sources --remove https://rubygems.org/
gem sources -a https://ruby.taobao.org/
2.安装cocoapod
sudo gem install cocoapods
3.cd 工程目录到终端,创建podfile
vim podfile 编辑podfile
platform:ios,'7.0'
pod 'AFNetworking','~>2.0'
pod 'MBProgressHUD', '~> 0.9.1'
pod 'MJRefresh', '~> 3.0.7'
使用命令搜索需要的第三方库 pod search AFNetworking
4.安装 pod install
5.更新 pod update