我正在尝试按照XCode - Code Coverage?和Code Coverage on Xcode 4.4.1
中的说明操作.gcno文件是在DerivedData中生成的,但我无法生成.gcda文件。当我按下主页按钮时,日志会显示:
Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
fopen$UNIX2003 called from function llvm_gcda_start_file in image MyApp.
(lldb)
答案 0 :(得分:1)
根据Xcode Code Coverage and fopen$UNIX2003和Code coverage with Xcode 4.2 - Missing files
将以下内容作为.m文件添加到项目中:
#include <stdio.h>
FILE *fopen$UNIX2003( const char *filename, const char *mode )
{
return fopen(filename, mode);
}
size_t fwrite$UNIX2003( const void *a, size_t b, size_t c, FILE *d )
{
return fwrite(a, b, c, d);
}