1.OC中
Cocoa pods安装命令
- 安装淘宝镜像 gem sources -a https://ruby.taobao.org/
- sudo gem install cocoapods
- 查看一下安装是否成功: pod search AFNetworking
使用
1. 命令:cd 拖项目的文件夹向终端
- 查找三方AFNetworking : pod search AFNetworking
- 创建一个Podfile文件: touch Podfile
- 将查找的三方命令粘贴在Podfile文件里
- 下载三方:pod install --verbose --no-repo-update
1. 命令:cd 拖项目的文件夹向终端
- 查找三方名称 : pod search 名称
- 创建一个Podfile文件: pod init
- 将查找的三方命令粘贴在Podfile文件里
- 如下:
-
# Uncomment this line to define a global platform for your project platform :ios, '8.0' use_frameworks! target 'IOS8SwiftCocoapodsTutorial' do pod 'FontBlaster', '1.0.8' end target 'IOS8SwiftCocoapodsTutorialTests' do end
- 下载三方:pod install --verbose --no-repo-update