Dan*_*iel 3 github ios cocoapods podspec
在更新我的项目时,其中包含以下行Podfile
:
pod 'UIView-Autolayout', :git => 'https://github.com/dkk/UIView-Autolayout.git'
Run Code Online (Sandbox Code Playgroud)
使用该命令pod update
我想更新此github存储库中的pod,该存储库具有以下podspec:
Pod::Spec.new do |s|
s.name = 'UIView-Autolayout'
s.version = '0.2.2'
s.license = 'MIT'
s.platform = :ios, '6.0'
s.summary = 'Category on UIView to simplify the creation of common layout constraints.'
s.homepage = 'https://github.com/jrturton/UIView-Autolayout'
s.author = { 'Richard Turton' => 'jrturton@gmail.com' }
s.source = { :git => 'https://github.com/jrturton/UIView-Autolayout.git', :tag => s.version.to_s }
s.source_files = 'Source/*.{h,m}'
s.requires_arc = true
end
Run Code Online (Sandbox Code Playgroud)
作为输出我得到:Installing UIView-Autolayout 0.2.1 (was 0.2.1)
.为什么不安装版本0.2.2
?
(我的项目是iOS7.0,带ARC)
如果我更换Podfile
线路,pod 'UIView-Autolayout', :git => 'https://github.com/dkk/UIView-Autolayout.git', '0.2.2'
我会收到错误
该repo没有版本标记,0.2.2
在开发者/贡献者添加标记之前不会更新.
Cocoapods使用此值:
s.version = '0.2.2'
Run Code Online (Sandbox Code Playgroud)
通过查找与字符串完全匹配的标记名称.
编辑
来源还需要指向您的回购:
s.source = { :git => 'https://github.com/jrturton/UIView-Autolayout.git', :tag => s.version.to_s }
Run Code Online (Sandbox Code Playgroud)
编辑2
它似乎评论了pod(在行的开头放置一个哈希)并运行pod install(删除它),然后取消注释并再次运行pod install是必要的.
直觉是pods.lock文件有缓存的东西,并且不想切换到同一个库的新repo.
归档时间: |
|
查看次数: |
982 次 |
最近记录: |