Podfile仓库版本控制

  1. 使用最新版本
pod 'SSZipArchive'
  1. 使用固定版本
pod 'Objection', '0.9'
  1. 比较符号
 '> 0.1' Any version higher than 0.1
 '>= 0.1' Version 0.1 and any higher version
 '< 0.1' Any version lower than 0.1
 '<= 0.1' Version 0.1 and any lower version
  1. ~>符号
 '~> 0.1.2' Version 0.1.2 and the versions up to 0.2, not including 0.2 and higher
 '~> 0.1' Version 0.1 and the versions up to 1.0, not including 1.0 and higher
 '~> 0' Version 0 and higher, this is basically the same as not having it.
  1. 开发模式,可源码调试
pod 'Alamofire', :path => '~/Documents/Alamofire'
  1. 指定某个git仓库
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git'
  1. 指定仓库的某个分支
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :branch => 'dev'
  1. 指定仓库的某个tag
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :tag => '3.1.1'
  1. 指定仓库的某个提交
pod 'Alamofire', :git => 'https://github.com/Alamofire/Alamofire.git', :commit => '0f506b1c45'

参考pod网站说明-详细解释podfile版本控制

你可能感兴趣的:(Podfile仓库版本控制)