There are some 3rd party in my code, like the World Magnetic Model or GeoTrans. Both read in files from the current directory when compiled as command line binaries, which is no problem. However, when I include that code in my iOS project, for some reason I have trouble making that work.
In the 3rd Party code, the file is read with fopen, like:
MODELFILE = fopen(filename, "r");
where filename is something like “wmm.cof” and MODELFILE ends up being NULL (0x0).
When I check my app bundle, I do see a file called wmm.cof in the same (root) directory as the binary of my app, but no luck.
How can I handle that?
Thanks!
you want to do something like:
if you want to keep the file that code is in portable, you may want to move the objc code to a separate file and just return a
const char *