Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14878] iOS: CFBundleShortVersionString is same as CFBundle version

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-05-23T20:57:16.000+0000
Affected Version/sRelease 3.1.2
Fix Version/s2014 Sprint 10, 2014 Sprint 10 Tooling, Release 3.3.0
ComponentsCLI, iOS
Labelsmodule_build, qe-3.1.2, qe-testadded
ReporterAnshu Mittal
AssigneeChris Barber
Created2013-08-14T06:50:43.000+0000
Updated2014-05-23T20:57:20.000+0000

Description

CFBundleShortVersionString is same as CFBundle version. This is not regression since the sisue occurs in 3.1.1 GA as well. Steps to reproduce: 1. Create an app using the code below and build it using studio. 2. On your computer, navigate to /build/iphone/Info.plist for your project. 3. Open the Info.plist file with a text editor Expected result After step 3: The following values should be in the Info.plist
<key>CFBundleVersion</key>
<string>2.1.3.4</string>
<key>CFBundleShortVersionString</key>
<string>2.1.3</string> 
Actual: The values in info.plist are as follows:
<key>CFBundleVersion</key>
<string>2.1.3.1376461852083</string>
<key>CFBundleShortVersionString</key>
<string>2.1.3.1376461852083</string>

Comments

  1. Eric Merriman 2013-08-14

    We have two things to consider here:

    Non-production builds: Development builds for iOS must have the appended timestamp in order for the new builds to trigger an update of the app with iTunes and with subsequent device sync.

    Production builds: We had a community ticket marked as invalid since it was using a 4-segment version and Apple spec is for 3 segment.

  2. Chris Barber 2013-08-14

    Eric is correct. In the example "2.1.3.1376461852083", the "1376461852083" part only exists for device builds. It is generated. If your tiapp.xml version is 1.2.3.4, the "4" is stripped and replaced with a random number for device builds and for all other builds the "4" should just be stripped to meet Apple's requirements.
  3. Chris Barber 2013-08-14

    Do we know if iTunes relies on the CFBundleVersion or CFBundleShortVersionString when doing the install to device? If it relies on the CFBundleShortVersionString, then I say we resolve this as won't fix.
  4. Ingo Muschenetz 2013-10-08

    Where is the information on the timestamp being required? Both properties appear to require 3 segments according to https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102364
  5. Chris Barber 2013-10-08

    [~ingo] As stated in the above comments, the timestamp is required for iTunes to detect a newer version and initiate the sync. Distribution builds force the versions to be in the format X.Y.Z.
  6. Ingo Muschenetz 2013-10-08

    [~cbarber] that's fine--do we have a reference doc on it?
  7. Chris Barber 2013-10-08

    [~ingo] No idea. [~bhatfield]?
  8. Ingo Muschenetz 2014-03-12

    We don't have enough bandwidth in 3.2.3, so saving this for 3.3.0.
  9. Ingo Muschenetz 2014-04-21

    Suggestion is to not change the version in the .plist file.
  10. Chris Barber 2014-05-16

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5691
  11. Tim Poulsen 2014-05-16

    Works as expected. With app version set to four-part number, CFBundleVersion retains all four parts, CFBundleShortVersionString has just the first three.
  12. Samuel Dowse 2014-05-16

    Verified fixed on: Mac OSX 10.9.3 Appcelerator Studio, build: 3.3.0.201405121247 Titanium SDK, build: 3.3.0.v20140516120912 Titanium CLI, build: 3.3.0-dev Alloy: 1.4.0-alpha Changed the version value in tiapp.xml to 1.0.7.8 info.plist displays:
        <key>CFBundleVersion</key>
            <string>1.0.7.8</string>
        <key>CFBundleShortVersionString</key>
            <string>1.0.7</string>
        
    Closing.

JSON Source