OneBusAway/onebusaway-iphone — pull request #230 by neophit (2013-11-05 01:27:19+00:00)
Title: Created aggregate target ‘Versioning’ to to execute shell scripts to set...

... bundle identifier and bundle version via Infoplist preprocessor file.

Added ‘Versioning’ target to the dependencies list of ‘OneBusAway’ target.
Enabled Info.plist preprocessing and set the Info.plist prefix header file in ‘OneBusAway’ target build settings.
Modified setBuildVersion script define GIT_COMMIT_SHA in infoplist.prefix.
Modified setBundleIdentifierForAppStore script to define BUNDLE_IDENTIFIER in infoplist.prefix.
Set CFBundleIdentifier to BUNDLE_IDENTIFIER.
Set CFBundleVersion to GIT_COMMIT_SHA.
Added build run script phase to ‘OneBusAway’ target to remove Infoplist preprocessor file from project temp directory.
Added scripts folder to the project files under the Resources group and excluded the files from all targets so they’re not copied to the app bundle.

Based on suggestions found in [this article](http://kswizz.com/post/2686511526/git-xcode-versioning), this solution should work for all Macs and submission to the App Store.

Tested:
- Build & Run on my device
- Debug and AppStoreDistribution configurations produce the correct bundle identifier when building and archiving
- Bundle version is correctly set to the current git short SHA with a + if there are uncommitted (dirty) changes in the build.