codemagic-ci-cd / cli-tools

Various utilities to managing Android and iOS app builds, code signing, and deployment.
https://codemagic.io/start/
GNU General Public License v3.0
267 stars 42 forks source link

Fix using xcresulttool on Xcode 16.0 beta 3+ #424

Closed priitlatt closed 3 months ago

priitlatt commented 3 months ago

With Xcode 16.0 beta 3+ part of xcresulttool API that we use to parse Xcode test results has been deprecated:

% xcrun xcresulttool get object --help
OVERVIEW: Get Result Bundle Object. This subcommand is deprecated and will be removed in a future release, consider using `xcresulttool get test-report` instead.

USAGE: xcresulttool get object [--legacy] --path <path> [--id <id>] [--version <version>] [--format <format>]
...

This causes xcresulttool get object calls with recent Xcode versions to exit with error and consequently some actions in xcode-project fail.

Apple has provided a quick workaround by providing --legacy flag that can be used to still use the old API even on more recent xcresulttool version. Changes on this PR make use of that flag when calling xcresulttool get object in case xcresulttool version is at least 23021.

Updated actions:

QA notes

Test are running and results can be successfully parsed using the following Xcode versions: