-
-
Save m1entus/cd259b32badc29af0196e47d2b74427b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Set here your Environment.plist name | |
ENVIRONMENT="DEV" | |
#Environment.plist path | |
ENVIRONMENT_PLIST="$PROJECT_DIR/AppName/Environments.plist" | |
#Get app name from Environment.plist | |
APP_NAME=$(/usr/libexec/PlistBuddy -c "Print :$ENVIRONMENT:APP_NAME" "$ENVIRONMENT_PLIST") | |
#Get bundle identifier from Environment.plist | |
BUNDLE_ID=$(/usr/libexec/PlistBuddy -c "Print :$ENVIRONMENT:BUNDLE_IDENTIFIER" "$ENVIRONMENT_PLIST") | |
#Set environment app name in Info.plist | |
/usr/libexec/PlistBuddy -c "Set :CFBundleName ${APP_NAME}" "${INFOPLIST_FILE}" | |
#Set environment bundle identifier in Info.plist | |
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier ${BUNDLE_ID}" "${INFOPLIST_FILE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment