Xcode Not Displaying Code Coverage for Main App When Using Test Plan on iOS Simulator

I am encountering an issue where code coverage data is not showing for my main app in Xcode when running tests for the iOS simulator. However, code coverage is being reported correctly for some modules.

  • Enable Code Coverage Support: YES
  • Xcode 16.2
  • macOS: 15.3.1
  • Macbook Pro M1 14-inch, 2021

Despite these configurations, Xcode fails to show code coverage for the main app. Can anyone suggest what might be causing this issue and how to ensure code coverage is correctly reported for the main app during simulator builds?

I see some errors related to code coverage in the logs. Are any of those referencing your app? Another thing to check is the Code Coverage setting in your test plan - is it configured to collect for "all targets" or "some targets"?

Xcode Not Displaying Code Coverage for Main App When Using Test Plan on iOS Simulator
 
 
Q