CFBundleVersion must be a period separated list of

2019-01-22 08:07发布

I'm getting this warning when trying to submit my app:

enter image description here

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."

This is the first time I'm seeing this after a lot of submissions with that versioning format.

Is something changed regarding CFBundleVersion ?

I'm guessing the three wasn't always there? or apple just started warning us about it?

From the 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.

Edit:

Apparently CFBundleVersion was changed as you can see here. It's a shame that I need to search WayBackMachine for something like that while Apple's "Document Revision History" says nothing about it.

7条回答
劳资没心,怎么记你
2楼-- · 2019-01-22 08:33

I was getting the Same issue as-

Blockquote

ERROR ITMS-90058: "This bundle is invalid. The value for key CFBundleVersion [ms-08-23] in the Info.plist file must be a period-separated list of at most three non-negative integers."

Blockquote

There after I went and searched with every Third party framework Plist and in SAP libraries I found Bundle version as [ms-08-23] . I changed it to a format of three non-negative integer i.e 3.0.0 , I changed it in every Framework of SAP - IT Worked.

查看更多
别忘想泡老子
3楼-- · 2019-01-22 08:36

It looks like Apple has taken this a step further and made this an error (not sure when this happened, but I'm using Xcode 6). Attempting to submit an application with a CFBundleShortVersionString with more than 2 decimal points will result in an archive's submission to iTunes Connect to fail now.

You now must have a CFBundleShortVersionString like 1.0, 4.5.2, etc. to successfully submit your applications. Could be a bit annoying, but I suppose it makes sense.

Error

查看更多
看我几分像从前
4楼-- · 2019-01-22 08:39

Apparently CFBundleVersion was changed as you can see here. It's a shame that I need to search WayBackMachine for something like that while Apple's "Document Revision History" says nothing about it.

查看更多
男人必须洒脱
5楼-- · 2019-01-22 08:40

This happened to a framework I was using from Cocoapods, here is how I fixed it:

You need to find non-standard CFBundleShortVersionString in info.plist file. I searched through all of them and found this in one of the repos:

  <key>CFBundleShortVersionString</key>
  <string>HEAD based on 1.0</string>

Changed it to this:

  <key>CFBundleShortVersionString</key>
  <string>1.0</string>

and it worked

This method, created by Cocoapods developers also works:

https://github.com/Jonge/Cocoapods-frameworks-version-number-fix

查看更多
▲ chillily
6楼-- · 2019-01-22 08:52

The recommended best-practice is to now use separate values for CFBundleShortVersionString and CFBundleVersion

  • 3-component max for CFBundleShortVersionString (ex: 4.2.3)
  • A build number CFBundleVersion

The CFBundleShortVersionString is the version shown on the App Store. The CFBundleVersion will need to change for every build you upload.

Ex: if you upload a new version (4.2.3) for review on iTunesConnect and if it gets rejected. You will need to resubmit a new build for the same version number (CFBundleShortVersionString = 4.2.3) with a different CFBundleVersion value

查看更多
别忘想泡老子
7楼-- · 2019-01-22 08:52

Follow the error, then search following the CFBundleVersion, in your case search: 3.3.9.2014.08.20 then change it to right version like 3.3.9 or 3.4.0,…(it must greater than the old version)

查看更多
登录 后发表回答