Guest User

Untitled

a guest
May 22nd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #In your Xcode target project settings select the "Build phases" tab.
  2. #Click the "+" button add select "New Run Script Phase"
  3. #In the script area paste this tiny script which will increment the bundle version every time the project is built:
  4.  
  5. #!/bin/bash
  6. # This script takes the build number from the release target plist, increments and then saves back
  7. bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PRODUCT_SETTINGS_PATH}")
  8. bN=$(($bN + 1))
  9. /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $bN" "${PRODUCT_SETTINGS_PATH}"
Add Comment
Please, Sign In to add comment