MARKETING_VERSION
(CFBundleShortVersionString
in Info.plist):
https://developer.apple.com/documentation/xcode/build-settings-reference#Marketing-Version
CURRENT_PROJECT_VERSION
(CFBundleVersion
in Info.plist):
https://developer.apple.com/documentation/xcode/build-settings-reference#Current-Project-Version
CFBundleShortVersionString:
https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring
CFBundleVersion:
https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion (important for App Store updates)
Targets inherit from project settings so you could just set the CURRENT_PROJECT_VERSION
and MARKETING_VERSION
in the project, delete the target specific build settings and each target will then use the project settings.
Customised / Levels at the top left of build settings helps to see what is customised or inherited in each target.
You can also use build configuration files to specify build settings for the project or specific targets / configurations which are often easier for scripts to update, avoiding any parsing of project.pbxproj files: https://developer.apple.com/documentation/xcode/adding-a-build-configuration-file-to-your-project
eg setting the following project.xcconfig
for all configurations (and removing CURRENT_PROJECT_VERSION
/ MARKETING_VERSION
from the project / target build settings) will use the xconfig versions for all targets:
project.xcconfig
CURRENT_PROJECT_VERSION = 1.0.0
MARKETING_VERSION = 1.0
You can also reference custom build settings just like any other build setting. eg $(MY_CUSTOM_BUILD_SETTING)
One of my projects uses xcconfig to manage custom TOOLS_OWNED
/ HELPER_AUTHORISED_CLIENTS
(SMPrivilegedExecutables
/ SMAuthorizedClients
) build settings for multiple targets and debug / release / distribution configurations as an alternative to SMJobBlessUtil-python3.py
updating Info.plist
files.