Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Add short version string to Info.plist #204

Merged
merged 3 commits into from
Feb 19, 2013
Merged

Conversation

gruehle
Copy link
Member

@gruehle gruehle commented Feb 14, 2013

@@ -20,6 +20,8 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>0.20.0.0</string>
<key>CFBundleShortVersionString</key>
<string>0.20.0.0</string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While updating version strings I noticed we use a different format than package.json: 0.20.0-0. Should these versions here be changed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. We have two options:

  1. Use "0.20.0" and leave off the build number
  2. Use "0.20.0-0" and have the scripts update the number here to match the number in package.json.

The first seems much simpler :-)

You could change the format when you update the version number to 21. Sound good?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Option 1 sounds good for now. My interpretation of the docs though says that the short version should be 0.20.0 and the CFBundleVersion would be only our build number, e.g. 5672.

http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-SW1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you dig in a bit further, the docs say to use "three, non-negative, period-separated integers" for CFBundleVersion:
http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-SW1

However, a quick (and entirely non-scientific) survey of two apps look quite different:

  • Photoshop uses "13.0.1.519" for CFBundleVersion and "13.0.1" for CFBundleShortVersionString
  • Sublime Text uses "2217" for CFBundleVersion and "Version 2.0.1, Build 2217" for CFBundleShortVersionString

I don't know where CFBundleVersion is used. I do know that CFBundleShortVersionString is used in the Finder "Get Info" dialog and when right-clicking and selecting "Open With >" (the number is in parens after the app name)

@jasonsanjose
Copy link
Member

Just checking in. You were going to go with option 1 right? And leave CFBundleVersion alone?

@gruehle
Copy link
Member Author

gruehle commented Feb 19, 2013

I updated both CFBundleShortVersionString and CFBundleVersion for consistency. Eventually your grunt scripts could put the correct build number in CFBundleVersion, if needed.

@jasonsanjose
Copy link
Member

Merging.

jasonsanjose added a commit that referenced this pull request Feb 19, 2013
Add short version string to Info.plist
@jasonsanjose jasonsanjose merged commit d5b1c77 into master Feb 19, 2013
@jasonsanjose jasonsanjose deleted the glenn/issue-2835 branch February 19, 2013 22:40
jasonsanjose added a commit that referenced this pull request Dec 8, 2015
Add short version string to Info.plist
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants