实际上,为什么CocoaPods不安装最新版本的Pod? [英] In fact, why does CocoaPods not install the latest version of pods?
问题描述
注意-实际上确实如此。使用Marcelo解释的语法。希望对别人有帮助!
Note - actually apparently it does. Use the syntax Marcelo explains. Hope it helps someone!
有了CocoaPods,您基本上可以做到这一点,
With CocoaPods, you basically do this,
pod 'GTScrollNavigationBar', '~>0.1.1'
,例如
,它将安装0.1.1的 GTScrollNavigatorBar。
and it will install 0.1.1 of 'GTScrollNavigatorBar'. That's fantastic.
但是-为什么当新版本可用时,为什么不简单地更新'GTScrollNavigatorBar'?
However - why does it not simply update 'GTScrollNavigatorBar' when a new release is available?
推荐答案
基本上,它尊重您在 Podfile
中所说的内容。
Basically, it respects what you say in your Podfile
.
您有几种选择(来自 CocoaPods指南):
You have several options (from CocoaPods guides):
-
> 0.1
高于0.1的任何版本 -
> = 0.1
0.1版和更高版本 -
< 0.1
低于0.1的任何版本 -
<= 0.1
0.1版和任何较低版本 -
〜> 0.1.2
版本0.1.2和最高版本0.2,不包括0.2
> 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~> 0.1.2
Version 0.1.2 and the versions up to 0.2, not including 0.2
您还可以完全不提供任何版本,它将始终安装最新版本。另一个选择是提供特定版本,以便始终使用该版本。
You can also provide no version at all, which will install always the latest available. Another option is provide a specific version, so that version will be always used.
这篇关于实际上,为什么CocoaPods不安装最新版本的Pod?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!