Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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

— asked December 5th 2011 by Drew Wentzel
  • mobile, ios, xcode
0 Comments

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 December 5th 2011 by Chris Leyton
    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 December 5th 2011 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 December 6th 2011 by Chris Leyton
    • Hi Chris

      yes worked like a charm thank you!

      another workaround to add to the growing list

      — commented December 6th 2011 by Drew Wentzel
    • Hi Drew,

      Glad it worked, it's a workaround - but 1.8.x isn't officially supported yet so can't really complain about this one too much :)

      Can you mark the question as solved so it may help others in the future.

      — commented December 7th 2011 by Chris Leyton
    • I've just spend quite a while trying to figure out this problem only to come across this post and see it's a 1.8.x issue. You would have though this would have been fixed by now? (3 months on from your post). Where will I see what versions are supported when they are released? as 1.8.0 just appeared after an update so I thought I should use the latest version… Nothing told me that there were issues updating apps. When will I know that I should use 1.8.x?

      — commented February 21st 2012 by db digital
    • I've just been thru dealing with the 10.7.3 Update Application Loader issue, and now I'm wrestling with this at 3am - so much fun!

      — commented February 24th 2012 by Joe Falcone
    • Thank you so much for this! I was having the same issue and could not find a fix. The one thing I had to do though was after copying the Info.plist from build to root I had to delete the Info.plist from the build folder since it still said 1.0.

      — commented March 3rd 2012 by Grant Wolz
  • 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.

    — answered January 18th 2012 by Stephen Rhyne
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.