Created
July 7, 2021 12:34
-
-
Save rovkinmax/9dda2d4d36bccd6fe22ecc6bc6e44eee to your computer and use it in GitHub Desktop.
If Flutter does not set up CFBundleShortVersionString or CFBundleVersion use this script to set up it via build phase in xcode
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
buildName=$(sed -n -e "/FLUTTER_BUILD_NAME/ s/.*\= *//p" Flutter/Generated.xcconfig); | |
buildNumber=$(sed -n -e "/FLUTTER_BUILD_NUMBER/ s/.*\= *//p" Flutter/Generated.xcconfig); | |
echo "$buildName" | |
echo "$buildNumber" | |
oneSignalPlist="OneSignalNotificationServiceExtension/Info.plist" # any other plist | |
plutil -replace CFBundleShortVersionString -string "$buildName" "$oneSignalPlist" | |
plutil -replace CFBundleVersion -string "$buildNumber" "$oneSignalPlist" | |
runnerPlist="Runner/Info.plist" | |
plutil -replace CFBundleShortVersionString -string "$buildName" "$runnerPlist" | |
plutil -replace CFBundleVersion -string "$buildNumber" "$runnerPlist" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment