CFBundleShortVersionString does not update
I am having problems with the CFBundleShortVersionString not updating from 1.0 and this stops us from updating the app as it always fails validation.
I have found this:
http://developer.appcelerator.com/question/120234/app-icon-and-version-no-is-missing-at-xcode-organizer
and this:
http://developer.appcelerator.com/question/126340/cfbundleshortversionstring-is-always-10
and have tried updating the builder.py to:
shortversion = project_info_plist['CFBundleVersion'].split('.')
archive_info = {
'ApplicationProperties' : {
'ApplicationPath' : appbundle,
'CFBundleIdentifier' : project_info_plist['CFBundleIdentifier'],
'CFBundleShortVersionString' : '%s.%s' % (shortversion[0], shortversion[1]),
'IconPaths' : [os.path.join(appbundle,icon), os.path.join(appbundle,icon)]
},
'ArchiveVersion' : float(1),
'CreationDate' : datetime.datetime.utcnow(),
'Name' : name,
'SchemeName' : name
}
however in the info.plist the value still remains 1.0:
<key>CFBundleVersion</key>
<string>2.1323054662</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
I am using Titanium Studio, build: 1.0.2.201107130739
Iphone SDK 1.8.0.v20111109103101
Xcode version 4.2 (recently upgraded)
Any assistance would be very much appreciated
2 Answers
-
Accepted Answer
I suspect you're running 1.8.x - as the string not updating is a bug in that build. I got around this by manually updating the CFBundleShortVersionString in a custom info.plist dumped into the project's root directory.
-
Here's what I've discovered.
Ti Developer packages archives with two plist files. (Open the package contents to see).
The first root plist file has the CFBundleShortVersionString and the contentsfolder in the archive holds the CFBundleVersion key.
I was getting a CFBundleVersion version not high enough error (not verbatum).
The cause… I tried using a 1.0.1 version and Ti packaged my CFBundleVersion as 1.0.1326912887 instead of 1.0.1.326912887. Ti adds the unique id on the end of the version. However, they don't respect the third version placeholder when they append to the bundle version.Sooo, incrementing the second place holder for your app version (CFBundleShortVersionString), 1.1, fixed the issue for me.