Last active
September 13, 2022 18:05
-
-
Save alvaroroyo/227d9830eb9d0d8283edd66d9d6f149e to your computer and use it in GitHub Desktop.
This file contains 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