一.Cocoapods
1.安装Cocoapods(百度很详细)
2.在终端中进入项目根目录
cd /Users/YourMacName/Desktop //进入桌面
cd Project //进入桌面的project文件夹
cd YourProject //进入你的项目根目录
3.创建Podfile文件
pod init //初始化Podfile文件,文件包含格式化化代码只需修改即可使用
touch Podfile //新建Podfile文件,文件内容为空
4.编辑Podfile文件内容
platform:ios,"8.0"
use_frameworks!
target "YourProjectName" do
#pod "TargetProjectName"
...
end
5.通过Pod命令引入第三方库
pod install //从远程仓库下载安装Podfile中引用的第三方库
pod update //更新Podfile文件中引用的第三方库
二.Carthage