CFBundleShortVersionString does not update

You must Login before you can answer or comment on any questions.

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.

— answered 6 months ago by Chris Leyton
answer permalink
7 Comments
  • Hi Chris, thanks for the suggestion

    you are correct I am using 1.8.0. whatever

    OK if I need to manually change this where is the file actually contained and in what order do I do this?

    IE build the app, then....

    assistance would greatly be appreciated!

    — commented 6 months ago by Drew Wentzel

  • Hi Drew,

    When you build your app look in the build>iPhone directory and copy the generated info.plist file to the root project directory - where Tiapp.xml resides.

    Edit that plist file - you should see a entry for CFBundleShortVersionString - simply manually change that to whatever version you need.

    Save that file (in the root directory) and when you rebuild the project the auto-generated info.plist will take the data in your amended file.

    Hope this works for you, as it solved exactly the same issue for me.

    — commented 6 months ago by Chris Leyton

  • Hi Chris

    yes worked like a charm thank you!

    another workaround to add to the growing list

    — commented 6 months ago by Drew Wentzel

  • Show 4 more comments

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.

Your Answer

Think you can help? Login to answer this question!