Xcode "Build For Testing" always returning x86_64 architecture for code coverage purposes

When using Xcode's "Build for Testing", I have noticed the resulting MyApp.xctestrun file has an array of CodeCoverageBuildableInfos. This array has all of our built targets. They all have an Architectures array property. For all of our targets this is set to x86_64 when we build for Any iOS Simulator. This is irrespective of what we have "ARCHS" and "ONLY_ACTIVE_ARCH" set to (in our case we only want arm64).

We do have a number of local swift packages defined, each with their own test targets. We are using a test plan for these tests.

This is causing issues when processing the resulting xcresult file since it is complaining that it can't find objects for the correct architecture when calculating code coverage.

No object file for requested architecture No coverage data found. (Underlying Error: No object file for requested architecture)

Xcode "Build For Testing" always returning x86_64 architecture for code coverage purposes
 
 
Q