Set-xcode-build-number not works Xcode 13 project

Hi, I am trying to setup CI\CD for my project in Bitrise. The project is new Created in Xcode 13 and it seems new Xcode doesn’t user info.plist to increment build number. I googled but all solution are old and doesn’t work.
Had anyone luck to make work it.

+------------------------------------------------------------------------------+

| (7) set-xcode-build-number@1                                                 |
+------------------------------------------------------------------------------+
| id: set-xcode-build-number                                                   |
| version: 1.0.11                                                              |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2022-01-19T20:17:28Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[20:17:28]  * [OK] Step dependency (xcode) installed, available. 
 (i) Provided Info.plist path: /Users/vagrant/git/[PROJECT_NAME]/Info.plist
 (i) Version number: 1.0
 (i) Build number offset: 1
 (i) Build number: 20
# ---- Current Bundle Version:
/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${CONFIG_project_info_plist_path}"
Print: Entry, "CFBundleVersion", Does Not Exist
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | set-xcode-build-number@1 (exit code: 1)                       | 1.58 sec |
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-io/set-xcode-build-number/issues   |
| Source: https://github.com/bitrise-io/set-xcode-build-number                 |
+---+---------------------------------------------------------------+----------+

Thanks in advance

1 Like

I’m pretty sure it has to do with this Xcode 13 Missing Info.plist

We are having the same issue.

Afaik, the mentioned article suggests disabling Xcode 13 info.plist automatic generation and making the project file backward compatible with Xcode 12.

This may be an okay workaround for the time being, but moving forward: Is there another alternative that we can leverage from Bitrise, to avoid having to create Xcode 12 versions of new Xcode 13 projects (specially if they are SwiftUI based)?

1 Like

You can create a new ‘Script’ build step with the following content, and it should accomplish this. This worked for us.

xcrun agvtool new-version -all "${BITRISE_BUILD_NUMBER}"