Skip to content

Instantly share code, notes, and snippets.

@taylorhughes
Created April 16, 2013 19:42
Show Gist options
  • Save taylorhughes/5398956 to your computer and use it in GitHub Desktop.
Save taylorhughes/5398956 to your computer and use it in GitHub Desktop.
Post-compile "Run Script" build phase for Xcode to add a "radioactive" symbol to your app name when built in debug mode.
INFO_PLIST="$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH"
# Copy from this key to the DisplayName key so we don't have to
# worry about re-reading from the same plist later.
SOURCE_NAME_KEY="CFBundleName"
DISPLAY_NAME_KEY="CFBundleDisplayName"
DISPLAY_NAME=`defaults read $INFO_PLIST $SOURCE_NAME_KEY`
if [ "$CONFIGURATION" = "Debug" ]
then
DEBUG_DISPLAY_NAME="$DISPLAY_NAME ☢"
else
DEBUG_DISPLAY_NAME="$DISPLAY_NAME"
fi
defaults write $INFO_PLIST $DISPLAY_NAME_KEY "$DEBUG_DISPLAY_NAME"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment