2

Since Xcode 13, there is no Info.plist by default. Instead, the common field are in the target’s Info tab, and build settings in the project editor. A separated Info.plist file is added to project only when there are additional fields.

When I run the following command to set MARKETING_VERSION on Jenkins

$ xcrun agvtool new-marketing-version 1.0.0

It doesn't have any effect on Info.plist file unless the key CFBundleShortVersionString exists. But every time I update field in target's Info tab, the Info.plist file seems to be regenerated again and CFBundleShortVersionString disappear.

Therefore, I'm wondering is there any suggestion about how to setting MARKETING_VERSION via command line or how to use agvtool in this case. Any suggestion would be appreciated!

mrfour
  • 1,128
  • 12
  • 21

1 Answers1

6

Indeed, in Xcode 13 agvtool has trouble to update marketing version. In order to "fix" it, set GENERATE_INFOPLIST_FILE to NO in Build settings. This will prevent Xcode to generate the Info.plist automatically. Then create your own Info.plist with the same values and it should works.

Maxime

  • The problem is that even if you set `GENERATE_INFOPLIST_FILE` to NO, `MARKETING_VERSION` is no longer in the `Info.plist` file, but in the project file and so does not get updated. – PLG May 26 '23 at 07:51
  • add Info.plist, copy values from generated to new,add path to the new Info.plist in build settings,generate plist -> NO, make sure you are not copying it to target (because it is processed and than copied, you would have error that it is done twice), than xcrun agvtool new-marketing-version 1.2.3 <-new test version works, it does update correct field. – Juraj Antas Jun 29 '23 at 08:35