39

I'm submitting an update to one of my apps. I've done this dozens of times with the many different apps I've developed, but this one is failing for some weird reason. I archive my app, then attempt to Validate the archive and get the following error message:

This bundle is invalid. The key CFBundleVersion in the Info.plist file must contain a higher version than that of the previously uploaded version.

iTunesConnect shows this app is currently at 1.0 and I've configured it to be ready to upload version 1.1 (screenshot with app icons redacted):

iTunes Connect Screenshot

Here's a screenshot of my app target's summary info which shows the version and short version are both "1.1":

enter image description here

Here is the top half of the Info.plist from the Bundle Archive:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>AppStoreFileSize</key>
    <integer>20859080</integer>
    <key>ApplicationProperties</key>
    <dict>
        <key>ApplicationPath</key>
        <string>Applications/MyApp.app</string>
        <key>CFBundleIdentifier</key>
        <string>com.mydomain.myapp</string>
        <key>CFBundleShortVersionString</key>
        <string>1.1</string>

And here's the relevant piece of Info.plist from within the app within the Archive bundle:

<key>CFBundleShortVersionString</key>
<string>1.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
    <string>iPhoneOS</string>
</array>
<key>CFBundleVersion</key>
<string>1.1</string>

All version numbers within my updated app say 1.1, iTunesConnect says it's expecting 1.1... but it's complaining that the number is wrong.

What am I missing?

shim
  • 9,289
  • 12
  • 69
  • 108
Kenny Wyland
  • 20,844
  • 26
  • 117
  • 229
  • Are you submitting through the organizer, or the application loader? – CodaFi Mar 18 '12 at 00:51
  • You say that you are showing the "relevant" part of Info.plist (and the Bundle Archive) but the key that Validate is complaining about (`CFBundleVersion`) is not shown in either of those snippets that you have posted. So either it is missing (and that's the problem), or you simply posted the wrong section of code. This key corresponds to the `Build` field of the iOS Application Target settings and NOT the `Version` as you might expect. – lnafziger Mar 18 '12 at 02:56
  • The CFBundleVersion is the last key in the last Info.plist I posted (which is the one inside the app itself). – Kenny Wyland Mar 18 '12 at 08:18
  • 1
    Dont forget you need to archive the new version before trying to submit to Apple via Organizer! I spent a little bit trying to submit the old version's archive. -________- – collegecoder May 16 '13 at 17:06
  • I just got an email with this error and it turns out that one of my old builds, which was stuck in ITC as "processing" for the past week, was finally processed. When it first became stuck I resubmitted another build with an incremented build number, so when the older one finally got processed it triggered the error. – blwinters Oct 16 '15 at 19:17

10 Answers10

63

FYI. Apple thinks 1.11 > 1.2, so if you are going from 1.11 to 1.2 you need to go all the way to 1.20.

Enjoy.

Michael Wilson
  • 647
  • 5
  • 3
  • This is because Apple splits by the dots and compares component-by-component. This is historically consistent, and means that "1.11" is usually expressed on an Apple platform as "1.1.1". – Jonathan Grynspan Jan 23 '13 at 16:51
  • @Jonathan But 1.11 is not higher than 1.2 ! So in you would say 1.1.1 is higher than 1.2.0. – Binarian Feb 07 '13 at 21:57
  • 34
    @Viktor: 1.11 *is* higher than 1.2. *These are not mathematical numbers*. Each component is compared separately, so `1 == 1` but `11 > 2`. – Jonathan Grynspan Feb 08 '13 at 00:43
  • 1
    Apple is historically consistent with the versioning 1.23 (NOT 1.2.3). Apple usually expresses 1.1.1 as internal 1.11 NOT vice versa! 1.1 is expressed on a Apple platform as 1.10 IF you ever used 2 numbers behind the dot. IF you ever used 3 numbers you must write 1.100 and so on... – Binarian Feb 08 '13 at 19:37
  • 2
    This is similar to `NSNumericSearch` – tipycalFlow Sep 09 '13 at 11:28
  • 1
    Thanks for the insight. I now understand Apple's logic, and I think it is stupid. XD – Josh Sep 16 '14 at 07:21
  • So when I released version `1` of my app, then minor release `1.1` I was really releasing version `11`, and `1.11` bug fix was really version `111`? Jeez - I just released the 120th version of my app I guess. Time for me to rethink my version control scheme I guess - Apple, changing the status quo no matter what since 1976 – froggomad Jun 06 '19 at 13:16
51

It turns out that I had some problem in my original submission which caused the user-visible version to be "1.0" but the internal bundle version to be "1.2". So I changed my new version to be 1.3 and 1.3 and the submission worked.

enter image description here

Kenny Wyland
  • 20,844
  • 26
  • 117
  • 229
24

Same thing happened to me. My current App Store version was 2.03. I attempted to upload 2.1. All I had to do was change it to 2.10 and it worked.

Kjuly
  • 34,476
  • 22
  • 104
  • 118
John MacAdam
  • 249
  • 2
  • 2
  • 10
    This happens because leading zeroes are ignored, so your current version is actually parsed as 2.3 – Andy Jan 14 '14 at 22:58
5

Increasing the CFBundleShortVersionString or "Bundle versions string, short" did the Job for me.

Ammar Mujeeb
  • 1,222
  • 18
  • 21
4

This can be caused for another reason entirely.

I had an active TestFlight beta running. Build 2020, version 407

I submitted an app for official App Store review. Build 2020, version 435, and it was approved. It is just sitting there, waiting for me to push it live into the App Store.

Without adding a complicated side story, what I wanted to do is to give my TestFlight beta users an updated version to preview the official App Store version for a few days, before making the App Store version live. Why, you ask? Because they were getting free features, there were about to cost money once the app would go live.

So, I submitted Build 2020, version 436, to TestFlight, and it was rejected.

It was rejected because I have an approved official App-Store candidate with the same build number

Solution: Change the build number of your TestFlight version. I submitted Build 20200 (I added an extra zero) version 436 to TestFlight, and it was approved. Don't worry, you can still push this build to the same TestFlight beta group, as long as you're still using the same BundleID.

jungledev
  • 4,195
  • 1
  • 37
  • 52
4

My problem was that I tried from 1.9.12 to 1.9.2... if you think about it 1.9.2 its actually 1.9.02, so if you set 1.9.20 that would solve the problem.

Sebastian Paduano
  • 301
  • 1
  • 5
  • 17
3

Here is how I fixed the problem (and I'm guessing this is the issue with a lot of people):

1) Click on the general tab of your projects settings (which can be accessed by clicking on your project name which is at the top of all the code files).

2) Make sure the build field matches what you put in your plist for the "Bundle Version" key.

This was the problem for me, for whatever reason they were out of sync. I think when you change Bundler Version key it's supposed to sync up (and vice versa). But it didn't happen for whatever reason - might be a bug.

Ser Pounce
  • 14,196
  • 18
  • 84
  • 169
3

One of the reason could be next situation: You sent to AppStore version 1.0 with build number 50. You decided to give it to TestFlight users for test. And simultaneously decided to send this version for review to AppStore. Users starts testing it and all fine. Some time later AppStore approves it, and its not releases( it has developer peinding status). After u made some changes and want to give your Testflight users new release. You decide to increase build number to 51 and keep version number at 1.0. You will get that error which you described in your question in this case. You have to increase App version too.

swift2geek
  • 1,697
  • 1
  • 20
  • 27
1

For me the problem occurred simply because previous build was already reviewed by Apple but I did not release it. After I rejected the old build, I was able to upload the new one. Versions numbers were just fine. So yeah... Check your App Store Connect before uploading new build

0

If above answers don't fix your problem, Please make sure that the version in Xcode must be same to the version that you have created in Itunes connect.

In my case, on itunes connect, version was 1.38 but version was 1.3.8 in Xcode. Once I changed version to 1.38 in Xcode, issue was resolved.

Ghulam Rasool
  • 3,996
  • 2
  • 27
  • 40