BoltsFramework / Bolts-ObjC

Bolts is a collection of low-level libraries designed to make developing mobile apps easier.
Other
5.65k stars 578 forks source link

iTunesConnect Error: Targets built with coverage data in Xcode 9 #305

Open txaiwieser opened 6 years ago

txaiwieser commented 6 years ago

One of my test builds I just submitted to iTunes Connect (built with Xcode 9) failed processing with the following message:

Invalid Bundle - Disallowed LLVM instrumentation. Do not submit apps with LLVM profiling instrumentation or coverage collection enabled. Turn off LLVM profiling or code coverage, rebuild your app and resubmit the app.

This is caused by this issue. The new Xcode seems to build coverage data into all builds, not only for testing. From the changelog:

Schemes with Code Coverage enabled (in the Test action) will now always build with Code Coverage, including for the Run and Launch actions. This reduces the need to build multiple versions of the application. Users who require code coverage to be off for their non-test actions can explicitly use a separate scheme with coverage disabled. (31848014)

When building frameworks during the "Archive" action Xcode seems to handle that. But since Carthage dependencies are built externally and copied into the bundle later, they still contain coverage data.

Somehow the Carthage build process needs to make sure that gathering coverage data is disabled during build, even though it's enabled in the project.

More info https://github.com/Carthage/Carthage/issues/2056