Xcode not generating code coverage.

No coverage is generated for private xxxx.framework, but tests are running under this framework.

This was perfectly working before and started giving this error after updating to Xcode 16.

Failed to generate coverage for target xxxx.framework at paths (
    "/Users/xxxxxx/Desktop/xcode/Debug-iphonesimulator/Common/xxxxxx.framework/xxxx"
):

No object file for requested architecture
The operation couldn’t be completed. (XCTHCoverageReportGenerationErrorDomain error 2.). 
(Underlying Error: No object file for requested architecture)

No object file for requested architecture

Please post screenshots of the following build settings in your Xcode project for further assistance:

  • Architectures
  • Build Active Architecture Only
  • Excluded Architectures
  • Supported Platforms
  • Enable Code Coverage Support

To view build settings in your Xcode project, select your target in the Project navigator, then choose Build Settings. Choose All and Levels in the toolbar before taking the screenshots. Make sure that the screenshots show the settings for the Debug build configuration. For more information, see Configuring the build settings of a target.

Xcode not generating code coverage.
 
 
Q