Xcode版本(CFBundleShortVersionString)和内部版本(CFBundleVersion)之间的区别 [英] Difference between Xcode version (CFBundleShortVersionString) and build (CFBundleVersion)
问题描述
在Xcode 4中,我将其作为目标摘要:
In Xcode 4, I see this for my target summary:
版本"输入对应于info.plist文件中的CFBundleShortVersionString
,而构建"输入对应于CFBundleVersion
.
The "Version" input corresponds to CFBundleShortVersionString
in the info.plist file, and the "Build" input corresponds to CFBundleVersion
.
两者之间有什么区别?我看到互联网上很多人都希望为两者都赋予相同的价值,而我的怀疑是向后兼容.
What's the difference between these two? I see a lot of people on the internet wanting to put the same value in for both, and my suspicion is that is for backwards compatability.
我有两个问题:
1)如果我是从头开始的,那么对您的应用进行版本控制的最佳做法是什么?
1) If I were starting from scratch, what would be the best practice for versioning your app?
2)在我的应用程序的所有先前发行版中,我仅使用CFBundleVersion
.为了不弄乱升级过程,我是否应该像以前一样继续增加CFBundleVersion
,还是假设存在,是否可以切换到正确的方式"?
2) In all previous releases of my app, I only used CFBundleVersion
. In order to not mess up the upgrade process, should I continue to increment CFBundleVersion
the same way I have been or is it possible to switch to the "right way", assuming one exists?
推荐答案
The Apple document "Information Property List Key Reference" says that CFBundleShortVersionString
represents a release version, whereas CFBundleVersion
represents any build, released or not. Also, CFBundleShortVersionString
can be localized, though I don't know why you'd want to, since they say it is supposed to be "a string comprised of three period-separated integers". For a release build, it would be reasonable to make the two numbers the same. For a development build, you might tack something else on to the CFBundleVersion
, maybe another dot and integer.
这篇关于Xcode版本(CFBundleShortVersionString)和内部版本(CFBundleVersion)之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!