- In your Target Build properties set
Current Project Versionto 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.