我在尝试提交我的应用时收到此警告:
WARNING ITMS-9000: "This bundle is invalid. The value for key CFBundleVersion [3.3.9.2014.08.20] int the info.plist file must be a period separated list of at most three non-negative integers."
这是我在提交了大量使用该版本控制格式的文件后第一次看到这种情况。
CFBundleVersion 有什么变化吗?
我猜三个并不总是在那里?还是苹果刚刚开始警告我们?
来自Apple docs :
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.
编辑:
如您所见,显然 CFBundleVersion 已更改 here . 很遗憾,我需要在 WayBackMachine 中搜索类似的内容,而 Apple 的“文档修订历史”对此只字未提。
最佳答案
这发生在我在 Cocoapods 中使用的一个框架上,这是我修复它的方法:
您需要在 info.plist 文件中找到非标准的 CFBundleShortVersionString。我搜索了所有这些,并在其中一个存储库中找到了这个:
<key>CFBundleShortVersionString</key>
<string>HEAD based on 1.0</string>
改成这样:
<key>CFBundleShortVersionString</key>
<string>1.0</string>
成功了
这个由 Cocoapods 开发者创建的方法也有效:
https://github.com/Jonge/Cocoapods-frameworks-version-number-fix
关于ios - CFBundleVersion 必须是最多三个非负整数的句点分隔列表(警告 ITMS-9000),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25418798/