I would like to include the application version and internal revision, something like 1.0.1 (r1243), in my application\'s settings bundle.
The Root.plist file contai
Based on @Quinn's answer, here the full process and working code I use to do this.
Replace the contents with:
PreferenceSpecifiers
Title
About
Type
PSGroupSpecifier
DefaultValue
DummyVersion
Key
version_preference
Title
Version
Type
PSTitleValueSpecifier
StringsTable
Root
Create a Run Script build phase, move to be after the Copy Bundle Resources phase. Add this code:
cd "${BUILT_PRODUCTS_DIR}"
buildVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${INFOPLIST_PATH}" )
/usr/libexec/PlistBuddy -c "Set PreferenceSpecifiers:1:DefaultValue $buildVersion" "${WRAPPER_NAME}/Settings.bundle/Root.plist"
Replace MyAppName with your actual app's name, and the 1 after PreferenceSpecifiers to be the index of your Version entry in the Settings. The above Root.plist example has it at index 1.