Xcode版本(CFBundleShortVersionString)和内部版本(CFBundleVersion)之间的区别 [英] Difference between Xcode version (CFBundleShortVersionString) and build (CFBundleVersion)

查看:630
本文介绍了Xcode版本(CFBundleShortVersionString)和内部版本(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?

推荐答案

Apple文档表示CFBundleShortVersionString代表发行版本,而CFBundleVersion代表任何构建,发行或发行的版本.不是.另外,CFBundleShortVersionString可以本地化,尽管我不知道为什么要这么做,因为他们说这应该是由三个句点分隔的整数组成的字符串".对于发布版本,使两个数字相同是合理的.对于开发版本,您可以在CFBundleVersion上加上其他内容,也许是其他点和整数.

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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆