Umit Kaya
Umit Kaya

Reputation: 5951

Xcode "Manage Version and Build Number" option

I have just updated to Xcode 13 Beta and I am about to upload my first build to App Store using this version of Xcode. This version of Xcode shows a new App Store Connect distribution option which I previously haven't seen:

Manage Version and Build Number

This will change the version and build number of all content in your app to 1.2 (3).

enter image description here

I have already increased my version and build number from Xcode before archiving. What should we do here? If it is an automated way of build increment, what are the benefits of using it?

Upvotes: 76

Views: 25941

Answers (3)

salabaha
salabaha

Reputation: 2478

For folks using fastlane and struggling with Xcode changing build version.

New in Xcode 13:

When uploading an app to App Store Connect, the distribution assistant in Xcode detects whether your app has a valid build number (CFBundleVersion). If your app has an invalid number (like one that was used previously, or precedes your current build number), the distribution assistant provides an option to automatically increment it to a valid number. In addition, the distribution assistant ensures that the build numbers of all embedded content in your app (such as app extensions, App Clips, or watchOS apps) are in sync with your app. Note that this doesn’t modify your source code or your archive; Xcode updates the build number in a staged copy of your app before packaging and uploading it to App Store Connect. (59826409)

When using fastlane for building and releasing apps, you can pass "manageAppVersionAndBuildNumber: false" parameter to export_options of build_app action to disable xcode version change.

build_app( scheme: "your_app_scheme", export_options:{ manageAppVersionAndBuildNumber: false })

Upvotes: 26

Tarun Tyagi
Tarun Tyagi

Reputation: 10102

I have already increased my version and build number from Xcode before archiving. What should we do here?

If you are sure that you have already updated your version/build number before archiving, then you can uncheck this and this will be ignored.

If it is an automated way of build increment, what are the benefits of using it?

  1. It provides you a chance to change version/build just in case you forgot about it. There was no indication for this in previous Xcode versions.

  2. It allows you to change version/build number before export/upload (after archiving), previously you had to create a new archive if you wanted to change the version/build number.

Upvotes: 48

matt bezark
matt bezark

Reputation: 255

i ran into something unexpected with this - it also changes version numbers of frameworks embedded into the app.

https://developer.apple.com/forums/thread/690647

Upvotes: 15

Related Questions