Question:

We are currently seeing the following error when we run the build on iPad Simulator

Undefined symbols for architecture x86_64:
"_readdir$INODE64", referenced from:
  _ckFileList2::addDirNonRecursive2(int, FileMatchingSpec&, ExtPtrArrayXs&, ProgressMonitor*, LogBase&) in libchilkatIos.a(fileList.o)
  _ckFindFile::advancePositionLinux(char const*, LogBase&) in libchilkatIos.a(fileList.o)
"_opendir$INODE64", referenced from:
  _ckFindFile::ffOpenDir2(XString&, LogBase&) in libchilkatIos.a(fileList.o)
  _ckFileList2::addDirNonRecursive2(int, FileMatchingSpec&, ExtPtrArrayXs&, ProgressMonitor*, LogBase&) in libchilkatIos.a(fileList.o)
ld: symbol(s) not found for architecture x86_64

Answer:

You can fix this by adding the following functions to any of your Objective-C, C or C++ source files for your project. We added them to our main.mm:

// Functions that appear to be missing when targeting the Xcode iOS Simulators
// These are used by the Corona SDK OpenSSL plugin</code>

#include <dirent.h>
#include <fnmatch.h>

extern "C" DIR * opendir$INODE64( char * dirName );
DIR * opendir$INODE64( char * dirName )
{
return opendir( dirName );
}

extern "C" struct dirent * readdir$INODE64( DIR * dir );
struct dirent * readdir$INODE64( DIR * dir )
{
return readdir( dir );
}