Inner Exception: iPhone app version and build numbers
The steps:
- In your Target Build properties set
Versioning System
toapple-generic
- Set
Current Project Version
to something (e.g., 1). - In the project dir run:
/Developer/usr/bin/agvtool next-version -all (this or similar needs to be run to inc the build number each time (e.g., part of your code commit))
- Access the build number as a string like:
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]
Tip: If you right-click on any of the properties in the Info.plist view, click Show Raw Keys/Values.