1.在已经安装了CocoaPods的前提下,cd进入项目所在目录,创建Podfile文件:
touch Podfile
2.打开pod file文件:
open -e Podfile
3.在打开的Podfile文本编辑器里输入:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, ‘8.0’
use_frameworks!
target '天气' do
pod 'Alamofire', '~> 3.0'
end
4.保存后:
pod install --verbose --no-repo-update
5.完成之后:Alamofire被CocoaPods安装下来了。