1 打开终端 cd 项目路径(xcodeproj)父文件夹
2 输入 pod init,会在项目根文件名下面生成 podfile文件
3 打开 podfile文件 引用第三方库
如
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'test4' do
#输入第三方库
pod 'Alamofire'
pod 'SwiftyJSON', '~> 4.0.0'
end
4终端输入 pod install
网友评论