Skip to content

Instantly share code, notes, and snippets.

@scottdelly
Created April 9, 2015 23:00
Show Gist options
  • Save scottdelly/6b8e648a4ac403cfca14 to your computer and use it in GitHub Desktop.
Save scottdelly/6b8e648a4ac403cfca14 to your computer and use it in GitHub Desktop.
Xcode Automatic CFBundleVersion Incrementing
formatDate=$(date "+%Y%m%d%H%M%S")
buildNumber="${formatDate}"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${buildNumber}" "${PROJECT_DIR}/${INFOPLIST_FILE}"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${buildNumber}" "${SRCROOT}/<YOUR WATCHKIT APP FOLDER>/Info.plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${buildNumber}" "${SRCROOT}/<YOUR WATCHKIT EXTENSION FOLDER>/Info.plist"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment