Created
May 20, 2020 14:28
-
-
Save guttentag/7297ab8a1323891f6f92220d8963f6fa to your computer and use it in GitHub Desktop.
Inject App version to a label on LaunchScreen.storyboard (2 options)
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
# Output version numbers into a label on LaunchScreen.storyboard | |
sed -i "" -e "/userLabel=\"LAUNCH_APP_VERSION\"/s/text=\"[^\"]*\"/text=\"App Version: $MARKETING_VERSION\"/" "$PROJECT_DIR/daytwo/App/View/Base.lproj/LaunchScreen.storyboard" | |
# Output version & build number to the APP_VERSION label on LaunchScreen.storyboard | |
versionNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${INFOPLIST_FILE}") | |
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${INFOPLIST_FILE}") | |
sed -i "" -e "/userLabel=\"APP_VERSION\"/s/text=\"[^\"]*\"/text=\"Version: $versionNumber ($buildNumber)\"/" "$PROJECT_DIR/$PROJECT_NAME/Storyboards/Base.lproj/LaunchScreen.storyboard" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment