Xcode 7 - Code coverage data generation failed

Bartłomiej Semańczyk picture Bartłomiej Semańczyk · Aug 26, 2015 · Viewed 17k times · Source

When I run my tests I get an error:

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

enter image description here

On console was printed warning:

Timed out waiting 120 seconds for simulator to boot, current state is 1.

What is the reason?

Answer

Cruinh picture Cruinh · Feb 18, 2016

If you are integrating your project with a 3rd party dynamic framework, you may need to add a path in your build settings. Look for ->Build Settings->"Runpath search paths" and make sure it includes the path to the framework.

I was just seeing this exact issue myself after setting up my a project to use a framework my team has been working on. After updating this specific setting, the problem went away. In my case, the path was identical to one I already had to set for the "Framework search paths" setting.