I am adding "Version Detail" in settings.bundle. What could be a better way to set that identifier, I have seen few do it through code other's use the run script with Plistbuddy.
Is it like that if you use plistbuddy, it show's the updated version details immediately even if you do not open the app. after version update from app. store?
If done through code, one has to open the app. to see the update in the settings.
Here's a PlistBuddy example:
#
buildPlist="Info.plist"
settingsPlist="Settings.bundle/Information.plist"
# Get the existing buildVersion and buildNumber values from the buildPlist
buildVersion=$(/usr/libexec/PlistBuddy -c "Print CFBuildVersion" $buildPlist)
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBuildNumber" $buildPlist)
# Increment the buildNumber
buildNumber=$(($buildNumber + 1))
# Set the version numbers in the buildPlist
/usr/libexec/PlistBuddy -c "Set :CFBuildNumber $buildNumber" $buildPlist
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildVersion.$buildNumber" $buildPlist
# Set the version numbers in the settingsPlist
/usr/libexec/PlistBuddy -c "Set :PreferenceSpecifiers:1:DefaultValue $buildVersion.$buildNumber" $settingsPlist
Hope that helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With