ios - 使用 CFBundleVersion 比较提交的应用程序的不同版本是否正确

标签 ios xcode app-store

根据此处已接受答案的第 3 点: CFBundleVersion in the Info.plist Upload Error

Apple is supposed to be comparing the "CFBundleVersion" (i.e. "Bundle version" not the "Bundle versions string, short")

但是在这篇文章中: Difference between Xcode version (CFBundleShortVersionString) and build (CFBundleVersion)

它说版本映射到CFBundleShortVersionString,构建映射到CFBundleVersion

因此,这意味着当您向应用商店提交应用的新版本时,比较是在构建上进行的,而不是在 XCode 摘要页面中看到的版本上进行的。

这对我来说似乎是错误的方式 - 特别是考虑到苹果文档中的引用:

CFBundleShortVersionString represents a release version, whereas CFBundleVersion represents any build, released or not.

这意味着在提交应用程序的新版本时,您需要关注内部版本号,而不是版本号,这对我来说似乎很奇怪。更奇怪的是,因为根据这个: What's the difference between "version number" in itunes connect, "bundle version", "bundle version string" in xcode?

CFBundleShortVersionString 必须与 iTunesConnect 中的相同。那么为什么 Apple 检查 CFBundleVersion 而不是 CFBundleVersionShortVersionString 呢?

我已经提交了一个版本和内部版本均为 1.0 的应用,现在我想提交一个新版本并将两者都升级到 1.0.1,这在提交时会导致任何问题吗?

最佳答案

用户的报告似乎不一致。另外,SO 答案已有 2 年多了。

Apple App Distribution Guide 中有关“配置您的应用程序”的部分说的是:

Setting the Version Number and Build String

The version number is a two-period-separated list of positive integers, as in 4.5.2. The first integer represents a major revision, the second a minor revision, and the third a maintenance release. The version number is shown in the store and that version should match the version number you enter later in iTunes Connect. For details on possible values, see “CFBundleShortVersionString” in Information Property List Key Reference.

The build string represents an iteration (released or unreleased) of the bundle and can contain a mix of characters and numbers, as in 12E123. For Mac apps, the user can click the version number in the About window to toggle between the version number and the build string. For details on possible values, see “CFBundleVersion” in Information Property List Key Reference.

For iOS apps, update the build string whenever you distribute a new build of your app for testing. iTunes will recognize that the build string changed and properly sync the new iOS App Store Package to the device. For how to configure your app for testing, read “Beta Testing Your iOS App.”

这表明对于 App Store 来说重要的是 CFBundleShortVersionString 并且它应该与 iTunes connect 中的值匹配。在区分测试版本时会考虑对 CFBundleVersion 的更改。

但是,这在某种程度上与“Information Property List Key Reference ”所说的 CFBundleVersion 相矛盾

CFBundleVersion (String - iOS, OS X) specifies the build version number of the bundle, which identifies an iteration (released or unreleased) of the bundle. The build version number should be a string comprised of three non-negative, period-separated integers with the first integer being greater than zero. The string should only contain numeric (0-9) and period (.) characters. Leading zeros are truncated from each integer and will be ignored (that is, 1.02.3 is equivalent to 1.2.3). This key is not localizable.

苹果文档中出现相互矛盾的信息,这不是第一次,也不是最后一次。

就我个人而言,我会遵循应用程序分发指南指南,但是为两个值设置相同的版本号似乎符合两个文档,所以应该没问题。

对于我的 Mac OSX 应用程序,我在 CFBundleShortVersionString 中使用点分版本,并在 CFBundleVersion 中使用运行整数(对应于我的 SCM 修订号)。多年来提交这样的更新从未出现过问题

关于ios - 使用 CFBundleVersion 比较提交的应用程序的不同版本是否正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21004891/

相关文章:

XCode "verifying application"步骤需要很长时间

ios - 从网站下载 iOS 应用程序,无需 App Store

ios - iOS上如何应对不同的环境?

ios - ScrollView.contentOffset.y 无法移动小于 0.333 像素

ios - 如何发送多个数组请求?

ios - 从 GMSMapView 中移除 GMSPolyline

iphone - Xcode 4.2 测试版和 iOS 4.2

ios - 是否可以将 subview 发送到 Storyboard中创建的元素的后面?

ios - 如何从 UIPopoverController 呈现模态视图?

ios - 如何检测是否存在 dyld-ed 符号?