Xcode 6 Auto-Increment Build Number Script

I recently started using Parse.com’ crash reporting and wanted to pay better attention to my build numbers in Xcode.

Xcode 6 Auto-Increment Build Number Script
Xcode 6 Auto-Increment Build Number Script

 

I found this post on stackoverflow about it and used the solution. It works great and I certainly want to give credit where it’s due.

 

 

Xcode 6 Auto-Increment Build Number

 

 

Steps:

1. Create a ‘tools’ directory in your project (where your xcodeproj or xcworkspace file is)

2. Create bump_build_number.sh in that directory and make this the contents…

3. Be sure to set the permissions (e.g., chmod 777 *)

4. In your Xcode target, go to ‘Build Phases’ and add a new ‘run script’ phase (see image).

5. In the input field (where it says “Type a script or drag a script file from your workspace to insert its path”) enter this:

6. Change a file (so that the change flag is tripped in the script) and build. Verify the build number is updated.

You can view the build output in the Report Navigator (View>Navigators>Show Report Navigator).