Back to Home

Make Xcode Auto Increment the Build Number

Shane Qi • 2016-09-22 17:28
#!/bin/bash
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"

img1

Don't forget to change the build number found under General in the Identity section to Integer.