Xcode 7 - Code coverage data generation failed

前端 未结 19 2831
無奈伤痛
無奈伤痛 2020-12-25 09:32

When I run my tests I get an error:

Code coverage data generation failed.
Unable to retrieve the profile data files from \'UIDevice\'.

19条回答
  •  北荒
    北荒 (楼主)
    2020-12-25 10:30

    I tried a bunch of these solutions with no luck. I turned off the Code Coverage option in my Scheme's Test section, which suppressed the error but Tests would not run. Then I noticed quite a bit of stuff in NSLog console. Somewhere in there, it mentioned reference to a framework that I was no longer using and trying to load.

    I searched the app for it, and Build Settings -> Other Linker Flags was trying to load the framework that wasn't there anymore.

    I removed: -framework 3rd_party_libname

    Then tests worked again. This was confusing, but please check for NSLog msgs. I was using XCode 8.3

提交回复
热议问题