I believe this is a bug in Xojo.
Let me explain.
In Xojo, we set the following Version info:
Major Version
Minor Version
Bug Version
So we get something like 1.0.4
We can read these in the App object for display into a property. I call mine cAppVersion:
cAppVersion = str(me.MajorVersion) + "." + str(me.MinorVersion) + "." + str(me.BugVersion)
Works perfect.
However, when we upload to MAS, there are two different values that are required, CFBundleShortVersionString and CFBundleVersion.
CFBundleShortVersionString should be exactly like my cAppVersion above. So, it’s a value like 1.0.4
According to Apple, CFBundleVersion can be made up of 3 positive numbers, but it doesn’t have to be.
When uploading to iTunes connect, the Version information is a combination of both values, first CFBundleShortVersionString, and then CFBundleVersion, in parentheses.
If you do some research online, you’ll find the “right” way to handle this is:
CFBundleShortVersionString = something like 1.0.4
CFBundleVersion = a positive number, incremented each time you build and upload your app.
This sort of makes sense according to the way Apple uses the values when you upload your app. The CFBundleShortVersionString is supposed to be the MajorVersion.MinorVersion.BugVersion , and the CFBundleVersion is supposed to count the number of builds you upload. This is useful because there are a lot of situations where you need to reject an uploaded binary and upload another one with the same version number, and Apple will reject it when CFBundleVersion is the same (Tom Iwaniec’s original reason for this post).
So if you make CFBundleShortVersionString 1.0.4 and CFBundleVersion 5, then in iTunes Connect it will appear as 1.0.4 (5)
But here is where it gets seriously annoying, and here is where I believe there has got to be a mistake in Xojo.
If you do all of this the way Apple tells you to do it, incrementing CFBundleVersion per build, and using CFBundleShortVersionString as your MajorVersion.MinorVersion.BugVersion string, then you change the internal values of App.MajorVersion, App.MinorVersion, and App.BugVersion when you change CFBundleVersion!
In other words, in Xojo, App.MajorVersion, App.MinorVersion, and App.BugVersion appear to be pointing to the wrong plist value. They should point to CFBundleShortVersionString but they are (wrongly) pointing to CFBundleVersion
There is one other annoying thing Apple has done here that might help spare someone pain. CFBundleVersion MUST be incremented in each subsequent upload to MAS. You cannot upload CFBundleVersion 5 and then after that upload CFBundleVersion 4. Apple rejects it, and sends you an email telling you it’s wrong and you have to fix it.