1

I'm trying to follow the instructions in XCode - Code Coverage? and Code Coverage on Xcode 4.4.1

The .gcno files are generated in DerivedData, but I can't get it to generate the .gcda files. When I press the home button the logs say:

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)
Community
  • 1
  • 1
Nicholas Albion
  • 3,096
  • 7
  • 33
  • 56
  • Answered in [Xcode Code Coverage and fopen$UNIX2003](http://stackoverflow.com/questions/9575023/xcode-code-coverage-and-fopenunix2003) and [Code coverage with Xcode 4.2 - Missing files](http://stackoverflow.com/questions/8732393/code-coverage-with-xcode-4-2-missing-files) – Nicholas Albion Aug 28 '12 at 03:48

1 Answers1

1

As per Xcode Code Coverage and fopen$UNIX2003 and Code coverage with Xcode 4.2 - Missing files

Add the following as a .m file to your project:

#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);
}
Community
  • 1
  • 1
Nicholas Albion
  • 3,096
  • 7
  • 33
  • 56