Xcode 13.2 creates builds that may contain duplicate dependencies, causing the export to fail. This can be viewed by:
- downloading the YourPackage.xcarchive.zip from a failed build
- unzipping
- right-clicking and choosing Show Package Contents on the .xcarchive
- opening Products → Applications within the package
- right-clicking and choosing Show Package Contents on YourPackage.app
- opening the Frameworks folder
- then expanding the individual .framework folders to look for duplicates. The duplicates are contained within Frameworks sub-folders inside of the .framework
Example (unnecessary duplicates in red):
It can also be viewed in the Build folder after locally building with Xcode 13.2. I was able to reproduce on my x86 Mac Mini running Xcode 13.2 on Monterey. This bug is not listed in the release notes for Xcode 13.2 or 13.3.
Solution: Build with Xcode 13.3, even though Bitrise warns that 13.3 VMs use Monterey and Monterey VMs may be slower.