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

后端 未结 7 2245
隐瞒了意图╮
隐瞒了意图╮ 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:26

    For the Xcode 7 users out there, you might have been wondering why your Unit Tests crash after receiving messages like this. The solution I found was that you need to make sure that all possible targets involved in your build flow (including all libraries) should have these two build settings set to NO:

    GCC_GENERATE_TEST_COVERAGE_FILES = NO;
    GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO;
    

    If you search for the "Code Generation" section in the build settings you will find these as "Generate Test Coverage Files" and "Instrument Program Flow".

    For further reference see https://developer.apple.com/library/ios/qa/qa1514/_index.html

提交回复
热议问题