Skip to content

Instantly share code, notes, and snippets.

@rovkinmax
Created July 7, 2021 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rovkinmax/9dda2d4d36bccd6fe22ecc6bc6e44eee to your computer and use it in GitHub Desktop.
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
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