Dozens of "profiling:invalid arc tag" when running code coverage in Xcode 5

jasonjwwilliams picture jasonjwwilliams · Mar 19, 2014 · Viewed 13.7k times · Source

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...)

It doesn't seem to affect the tests, as they complete successfully, and also the GCDA coverage files are generated as expected.

Any idea what the message means, or how to suppress the messages/fix the issue, because they clutter up the build output and make it hard to find the test case results.

Answer

jstevenco picture jstevenco · Apr 10, 2014

Most likely this is a result of the build tools failing to merge current results into the existing .gcda coverage files. As Dave Meehan points out here, there is a brute force way of dealing with this by cleaning the product build folder, but a less hard core approach is to delete the .gcda files from targets generating them (for me, just the test target) as part of the build process. Dave includes a sample script to be included as a build phase -- or, at the project root by hand:

find . -name "*.gcda" -print0 | xargs -0 rm