citrix / citrix-mam-sdks

The MAM SDK instrument your apps to enable enforcing policies and controls that are configured in Citrix Endpoint Management.
https://developer.cloud.com/citrixworkspace/mobile-application-integration
11 stars 4 forks source link

Code Coverage collection fails on iOS versions > 23.11.0.4 #127

Open GeroHerkenrath opened 3 months ago

GeroHerkenrath commented 3 months ago

Hello!

As the subject says, it appears that code coverage is somehow broken in the newer versions of the iOS SDK. I am using Xcode 15.4 and see this issue when trying to up (date the SDK (which is directly copied into the project, no package manager).

I have created a small demo repo that reproduces the issue here.

The error I see in the logs when Xcode tries to generate the code coverage report is:

Showing All Issues
Failed to merge raw profiles in directory <...>/DerivedData/CTXMAMCodeCoverageFail-fftwxsloafuttualgnnmobfmnvaq/Build/ProfileData/00008027-000A40D42262802E to destination <...>/DerivedData/CTXMAMCodeCoverageFail-fftwxsloafuttualgnnmobfmnvaq/Build/ProfileData/00008027-000A40D42262802E/Coverage.profdata: Aggregation tool '<...>/llvm-profdata' failed with exit code 1: warning: <...>/DerivedData/CTXMAMCodeCoverageFail-fftwxsloafuttualgnnmobfmnvaq/Build/ProfileData/00008027-000A40D42262802E/7B5FB9D3-A66E-456C-854F-155C20768CE2-3819.profraw: invalid instrumentation profile data (file header is corrupt)
error: no profile can be merged

(I left out my home directory from the paths).

Some googling makes me think that perhaps one of the included libraries was compiled with an older toolchain or something?

makunterry commented 3 months ago

@GeroHerkenrath Thanks for your information, and your demo. We will try this and give you feedback later.