I’m currently developing an app that will retrive an updated database from our web server and replace the local one at given intervals. Now, since we don’t want to download 3MB of database over EDGE we bzip2 the file and then later unpack it on the phone. For this I need to use pure C to access the file with the bzip2 library.
I’ve been fighting with opening the downloaded file with fopen() for some strange reason. It keept telling me that the file didn’t exist even though the exact path given to NSData worked fine. So after lots of digging around I found that NSString had a function called [NSString fileSystemRepresentation]. This will give you a “file system-specific representation of the receiver”. And this worked just great. File opened perfectly. I did some printouts of the paths and there was no difference so I’m not sure why one works and the other don’t. Hope this helps some one out there :)

