sudo gem install cocoapods
-> This installs CocoaPods as a piece
of software on your machine.
Go to the root of your project directory and execute pod init
->
This will add a base Podfile to your project.
通过编辑此播客文件,将您拥有的外部依赖项添加到此播客文件.
运行pod install
,它将获取所有外部依赖项
从现在开始,你应该使用.xcworkspace
文件而不是.xcproject
/.xcodeproj
.
target 'MyApp' do
pod 'AFNetworking', '~> 3.0'
end
其中AFNetworking
是pod,3.0
是我要安装的特定版本.
文件:Using CocoaPods份