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