I have been trying to generate code coverage data for my application on XCode 4.2.1 (build 4D502) using the steps outlined at http://code.google.com/p/coverstory/wiki/UsingCoverstory
I am obviously missing something as there are no .gcno or .gcda files being generated along side my object files. I've tried adding the settings to both my test target and my application target but to no avail. I've had a second set of eyes go over things and all appears to be in order. Any ideas as to what is missing. Thanks in advance.
It doesn't work with llvm-gcc; you'll need to use the "LLVM Compiler 3.0" (aka clang). (I assume by the 'llvm-gcc' tag that you're not currently using it.)
I did this just last week, so it's definitely working.
来源:https://stackoverflow.com/questions/8407209/what-is-required-to-generate-code-coverage-data-using-xcode-4