CFBundleShortVersionString error

  • 2
  • Problem
  • Updated 2 years ago
I've been trying to make this iOS build now for several days. When I try to submit my .ipa file to Apple through the Application Loader program I keep getting this CFBundleShortVersionString error saying that my version is 112. The version I set in my config.xml is 123.

This is the error I get:

ERROR ITMS-90478: “Invalid Version. The build with the version “112” can’t be imported because a later version has been closed for new build submissions. Choose a different version number.”

ERROR ITMS-90062: “This bundle is invalid. The value for key CFBundleShortVersionString [1.7.5] in the info.plist file must contain a higher version that that of the previously approved version [112].”

Here is a little of my config.xml:


<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:gap="http://phonegap.com/ns/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="XXX"
versionCode="155"
version="1.7.5"
android-versionCode="155"
ios-CFBundleVersion="123">

<!--IOS release version-->
<config-file platform="ios" parent="CFBundleShortVersionString">
<string>123</string>
</config-file>

<!--IOS build number-->
<config-file platform="ios" parent="CFBundleVersion">
<string>123</string>
</config-file>


Any thoughts? Does the iOS build version have to match the Android build version? Neither is a version 112.
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 2
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
I wonder if
- changes in your config were processed by PGB; do you have Hydration switched on?. OR
- your config was found, read and parsed. Do you have both index.html and config.xml in the root ("/") of your zip file?
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes
Hello Petra,
I don't use hydration much and it is off.
Both index.html and config.xml are in the root.

In looking at the forums I have run across a variety of ideas most of which say to write in a CFBundleShortVersionString which I did several versions ago when I first ran across this problem. That solved it then, but it seems to be back.

I ran across opening up the .ipa and manually changing the CFBundleShortVersionString in the info.plist but that created another error message. Below is some of the code from the info.plist if that helps.

Starting at about line 44:

...
<key>CFBundleIdentifier</key>
<string>your app name</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>your app name</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.7.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>iPhoneOS</string>
</array>
<key>CFBundleURLTypes</key>
<array/>
<key>CFBundleVersion</key>
<string>123</string>
...
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes
I've been reading on various forums that CFBundleShortVersionString wants a number in the form of NNN.N.N

So since my number to "beat" is 112 I've tried a variety of numbers:
1.7.5
123
123.1.1
201.1.1 (note the one hundred series is upped to the two hundred series)

No luck. Apparently, in the way that Apple counts, none of these numbers is bigger than 112. I don't care what number I use, it's become meaningless for any sequential system I might even try to maintain. I just want a number that works and allows me to upload my .ipa.

Thoughts?
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
The suggestion with nnn.n.n is nonsense. Your initial setting in config (with 'config-file') is correct.
I think something different is going on.

Perhaps the build fails, you didn't notice and you aee still sending the old ipa to Apple.

Perhaps you have multiple config.xml in your zip and PGB sees the other one.

Perhaps everything builds correctly but you are uploading your previous ipa to ApplicationLoader.

Or something similar...
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes
@Petra V.
None of the above. I maintain my versioning very strictly.
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes
I have opened a copy of my .ipa into xcode and drilled down to the info.plist. There I saw that the Bundle Version was set to 1.7.5.

However I also saw that the "Bundle versions string, short" was also set to 1.7.5.

Isn't this the CFBundleShortVersionString? Shouldn't this have been set to 201.1.1 as per the last build I created on PGB?
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Yes, yes and your code is correct. That's why I believe your build is old for some reason.
Do you actually get a new build? Does the log show something?
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes
@Petra V.
I did a rebuild and submitted it via Application Loader and it failed with the same error, that the CFBundleShortVersionString must be greater than 112.

I opened the log file and scanned through it (War & Peace is shorter) and could not find anywhere where a version number, either the public version 1.7.5 or CFBundleShortVersionString 201.1.1 was assigned to the app. There were however 604 instances of the word "version". But there is no instance of the word "CFBundleShortVersionString" .

Suggestions?
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
When you did a rebuild, did you get a new version of your ipa generated?
Are you sure you did not pull an old version (for instance from browser cache)?
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes
Yes absolutely. I did a rebuild and then I downloaded the new .ipa to my machine and tried to upload it through Application Loader.
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
How did you determine that it was indeed a new ipa that you downloaded?
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes
Petra V.,

I just did a complete new upload. And got the same issue.

I incremented my CFBundleShortVersionString to 202.2.2 and zipped up a new zip to upload to PGB. I uploaded after getting the "this is a destructive upload, we don't keep earlier versions" warning from PGB. The upload took about 90 seconds to complete and a new .ipa was available about a minute later.

This is from the config.xml:


<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:gap="http://phonegap.com/ns/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="XXXX"
version="1.7.5"
versionCode="155"
android-versionCode="155"
ios-CFBundleVersion="202.2.2">

<!--IOS release version-->
<config-file platform="ios" parent="CFBundleShortVersionString">
<string>202.2.2</string>
</config-file>

<!--IOS build number-->
<config-file platform="ios" parent="CFBundleVersion">
<string>202.2.2</string>
</config-file>


After I downloaded the new .ipa I fired up Application Loader and attempted to upload it. It failed again saying that I needed a version greater than 112.

This is app 638197 if that helps at all.

And by the way, I really appreciate your help all through this mess.
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
I am still not convinced that you really received a new ipa, and not the old one from a server side or client side cache.
Wouldn't you first make absolutely sure that you have a new ipa, for instance by using a temporary different splashscreen image?

BTW:
1. You can have a simple shortversionstring in format nnn. It does not require nnn.n.n

2. I have never heard of ios-CFBundleVersion="xxxx"
Where did you get that from?
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes
Petra V.,

Since I've been trying to get this build loaded to Apple I've made on or two small textual changes in the content of the app. For instance earlier today I added a phone number. I've opened up my latest .ipa and checked and have seen the phone number is there in the build. I have to conclude that I'm getting fresh, not cached builds.

As for the NNN.N.N format for CFBundleShortVersionString, I found that on Stack Overflow in a variety of places. Here's one: http://stackoverflow.com/questions/19...

On the other hand if I don't need a NNN.N.N format I'd be very happy to go back to a simple integer format. Less to keep track of.

As for the ios-CFBundleVersion="xxxx" I also saw that on Stack Overflow though I can't find it again.

I'd be more than happy to get rid of the ios-CFBundleVersion or any other "junk" in the code. I just don't know what's junk and what's not anymore.
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
OK, Andrew. So, you do have a fresh ipa and the shortversionstring doesn't play nice.

At this point, if I were you, I would remove everything that doesn't seem to be directly related or necessary.
For instance, in my dozens of apps, I only have
<config-file platform="ios" parent="CFBundleShortVersionString">
<string>99</string>
</config-file>

...and all of those apps have been published correctly multiple times.

So:
- no format nnn.n.n for that string
- no config-file block for CFBundleVersion
- no ios-CFBundleVersion attribute
Photo of Andrew Fishman

Andrew Fishman

  • 19 Posts
  • 0 Reply Likes
Petra V.,

I spent some time this morning on the Apple Developers site looking for info on this problem. I wasn't alone by any means. I tried some "solutions" that I saw but didn't get anywhere with them either. Finally I saw someone suggest incrementing the version (what I had thought was the "public version") which I had set at 1.7.5. I set it to 1.76 as per suggestion and got the following error:



As you can see it looks like the CFBundleShortVersionString is being set from the version number and neither 1.7.5 nor 1.76 is greater than 112.

So I set the version and the CFBundleShortVersionString to 155 to match my Android versionCode and the .ipa uploaded successfully.



Don't ask me why. I'm just thankful it finally uploaded. Thanks for all of your help and patience on this.

Andrew
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Hi Andrew. Thanks for reporting back.
This would suggest that the config-file construct for CFBundleShortVersionString all of a sudden doesn't "do anything" anymore. That would be quite a nasty change (and undocumented, afaik, too!).
I'll keep an eye on this. Thanks again!
Photo of Daniel de Oliveira Bessa

Daniel de Oliveira Bessa

  • 1 Post
  • 0 Reply Likes
Eu também tive o mesmo problema e deixar o numero da versão em "versão" sem pontos também resolveu pra mim, e eu tinha usado CFBundleShortVersionString que também não tinha dado em nada. Estranho que antes funcionava. Obrigado!