When running my Test target with code coverage enabled in Xcode 5, I get dozens of the following message in the build output:
profiling:invalid arc tag (0x..
I have spent some time trying to figure out how to get rid of those ugly and annoying messages:
profiling: /Users/appfactory/Desktop/WORK/App/trunk/ObjectiveC.gcda: cannot merge previous GCDA file: corrupt arc tag (0x00000000)
It seemed like an Xcode 7 issue that was not fixed in the current Xcode 7.1 beta 2.
The problem is caused by failing to merge the existing .gcda coverage files with the current results.
What I tried:
echo "Delete .gcda files" echo "${OBJECT_FILE_DIR_normal}/${CURRENT_ARCH}"
Attention: the ObjectiveC.gcda file may be at a different location!
Set the following build settings to YES - also not helping
Enable Code Coverage Support to YES
Generate Legacy Test Coverage Files to YES
Instrument Program Flow to YES
The solution in my case:
Set the following build settings for the main target
Enable Code Coverage Support to YES
Generate Legacy Test Coverage Files to YES
Instrument Program Flow to NO
Set the following build settings for the test target (and any other targets)
Enable Code Coverage Support to NO
Generate Legacy Test Coverage Files to NO
Instrument Program Flow to NO
Hope it helps!