gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-29 10:49:43 25 4
gpt4 key购买 nike

根据此处接受的答案的要点 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)

它表示 Version 映射到 CFBundleShortVersionString 并且 Build 映射到 CFBundleVersion

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

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

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.

这不是第一次也不是最后一次 Apple 的文档有相互矛盾的信息。

就我个人而言,我会遵循 App Distribution Guide 指南,但为两个值设置相同的版本号似乎符合两个文档,所以你应该没问题。

对于我的 Mac OSX 应用程序,我在 CFBundleShortVersionString 中使用带点的版本,在 CFBundleVersion 中使用运行整数(对应于我的 SCM 修订号)。多年来一直提交这样的更新,从来没有遇到过问题

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com