在项目目录下创建Podfile 文件。
在文件中输入内容:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target 'jushi-app-ios' do
pod 'Alamofire', '~> 4.7'
end
jushi-app-ios 是项目主目录
'Alamofire' 是需要安装的第三方库,后面的4.7 是版本号
然后在终端程序中进入到当前目录,输入$ pod install
.
提示成功之后,用新产生的jushi-app-ios.xcworkspace
文件打开项目即可。