CocoaPods 安装
Podfile
语法参考
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'MVVMReactiveCocoa' do
pod
pod 'DZNEmptyDataSet', '1.5.2'
# pod git 上master分支的版本
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git'
# pod dev分支的版本库
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'dev'
# pod 指定tag的库
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '3.1.1'
# pod 指定commit号版本
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :commit => '0f506b1c45'
pod 'JSONKit', :podspec => 'https://example.com/JSONKit.podspec'
#本地podspec
pod 'xxxx', :path => '/Users/xxxx/xxxx/xxxx/xxxxx.podspec'
end
target :App do
# 1.
pod' xx' , '1.0.0'
pod 'xx', '= 1.0.0 '
pod 'xx', '>= 1.0.0'
pod 'xx' , '< 1.0.0'
pod 'xx', '~> 1.0.0' #模糊版本号 最后欧一位是变化的
#2.
pod' xx' , git: ' xxx.git', tag: ' 1.0.0'
end