加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – CFBundleVersion必须是最多三个非负整数的周期分隔列表(W

发布时间:2020-12-15 01:40:54 所属栏目:百科 来源:网络整理
导读:尝试提交我的应用时收到此警告: 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.” 这是第一次在
尝试提交我的应用时收到此警告:

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这样的东西,而苹果的“文件修订历史”没有说什么.

解决方法

这发生在我从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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读