Skip to content

Instantly share code, notes, and snippets.

@RenGate
Created February 20, 2015 09:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RenGate/cfeb596e0bf2bba8edcb to your computer and use it in GitHub Desktop.
Save RenGate/cfeb596e0bf2bba8edcb to your computer and use it in GitHub Desktop.
Automatic generation of build number in Xcode project for easy Apple TestFlight distribution. It is a known fact that Apple TestFlight checks build number of uploaded ipa file and rejects binary if its build number is "less" than the one of the latest accepted build. It is hard to constantly change build number and push it to repo for building u…
buildNumber=$(date +%y.%m.%d.%H%M)
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment