Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dgdosen

macrumors 68030
Original poster
Dec 13, 2003
2,772
1,409
Seattle
Can anyone provide a pointer or two about how to start adding build numbers to an XCode project?

I'd assume this was done automatically, but can't seem to find what I'm looking for in the documentation.

Will XCode increment build numbers automatically?
If so, where is that stored?

Thanks for any pointers in advance...
 

SwampThingTom

macrumors member
Jul 12, 2008
37
0
Fairfax, VA
There are two keys in the application's information property list file (info.plist) that are used to track build versions.

CFBundleShortVersionString is a release version number, which is what the App Store keys off of when you upload a new version. It's a string consisting of three integers separated by period in the form: major.minor.release.

There's also CFBundleVersion which the documentation says is a build version number, consisting of one or more integers separated by periods, that can be used to differentiate unreleased interim builds.

You have to change these yourselves by opening up info.plist and setting the values manually.

Look in the Runtime Configuration Guidelines document for more info and a description of all of the predefined property list keys.
 

dgdosen

macrumors 68030
Original poster
Dec 13, 2003
2,772
1,409
Seattle
There are two keys in the application's information property list file (info.plist) that are used to track build versions.

CFBundleShortVersionString is a release version number, which is what the App Store keys off of when you upload a new version. It's a string consisting of three integers separated by period in the form: major.minor.release.

There's also CFBundleVersion which the documentation says is a build version number, consisting of one or more integers separated by periods, that can be used to differentiate unreleased interim builds.

You have to change these yourselves by opening up info.plist and setting the values manually.

Look in the Runtime Configuration Guidelines document for more info and a description of all of the predefined property list keys.

Excellent!
Any way to automate the updating of the pList file?
 

firewood

macrumors G3
Jul 29, 2003
8,113
1,353
Silicon Valley
Excellent!
Any way to automate the updating of the pList file?

The Info.plist file appears to be XML in plain text. A perl script (or whatever your favorite scripting language is) should be able to string substitute an increment to the bundle version. Maybe an Applescript as well, and then tell XCode to build, if XCode is scriptable that way. Anyone know?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.