When I run my tests I get an error:
Code coverage data generation failed.
Unable to retrieve the profile data files from \'UIDevice\'.
If you are using cocoa pods, check this thread on the Cocoapods repository: https://github.com/CocoaPods/CocoaPods/issues/5385#issuecomment-226269847
This fixed my problem:
Copying @dfleming response:
For some reason, it appears that CocoaPods is not adding the "[CP] Embed Pods Frameworks" build phase to the UI Tests target when generating the project workspace.
I manually added this in and the UI Tests were runnable again.
This build phase should run the following script: (Replace {YourProject} with your project name)
"${SRCROOT}/Pods/Target Support Files/Pods-{YourProject}UITests/Pods-{YourProject}UITests-frameworks.sh"