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

后端 未结 7 2241
隐瞒了意图╮
隐瞒了意图╮ 2020-12-13 05:54

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


        
7条回答
  •  执念已碎
    2020-12-13 06:28

    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
    

提交回复
热议问题