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

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

    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:

    1. Remove those .gcda files with RunScript - does not work in my case

    echo "Delete .gcda files" echo "${OBJECT_FILE_DIR_normal}/${CURRENT_ARCH}"

    Attention: the ObjectiveC.gcda file may be at a different location!

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

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

提交回复
热议问题