Reproduction steps:
1. Open the attached project “BuildRepro” on a Windows machine
2. Build the project for the iOS platform
3. Export the built Xcode project to a macOS machine
4. Open the built Xcode project
5. Archive the project Product → Archive
Expected result: The project is archived
Actual result: Error “Command PhaseScriptExecution failed with a nonzero exit code” is thrown in the Xcode console
Reproducible with: 2020.3.44f1, 2022.2.5f1, 2023.1.0b2
Not reproducible with: 2021.3.16f1
Reproducible on: macOS 13.1 (Intel)
Notes:
- The project built with 2023.1.0b2 gets stuck on the “Planning deferred tasks” process
- Did not look for regression because of the complicated steps needed to reproduce this issue