Using same version number for multiple Xcode targets Info.plist
The following works with Xcode 12 and does not require User-Defined variables.
- Select your project
- Select Build Settings and find "Versioning"
- Set "Marketing Version" to be your version
- Set "Current Project Version" to be your build
- Next, select each of your targets
- Delete/remove any version number and it will use the default "Marketing Version"
- Delete/remove any build number and it will use the default "Current Project Version"
- Do this for all of your targets
Once you do this, you only need to update the "Marketing Version" and "Current Project Version" for the Project and all of your targets will be updated accordingly.
Add a new custom property to your project (Editor
-> Add Build Setting
-> Add User Defined Setting
). Let's name it MY_VERSION
and let's give it value 1.0.1
.
Now go to the Info
section of every target and set the version to ${MY_VERSION}
.