In Xcode 4.5 with LLVM, to enable code coverage on a project:
- Set "Instrument Program Flow" and "Generate Test Coverage Files" to Yes in the Build Settings.
- You'll want to have the program properly exit in order to generate the files. A simple way is:
- (void)applicationDidEnterBackground:(UIApplication *)application {
exit(0);
}