If your application accesses and edits an already existing file is it okay for that file just to be placed in the resources folder?
+3
A:
No, because the app bundle is read-only on the iPhone. You would have to copy the file from the bundle to your app's documents directory on first launch. Use this code to find the documents directory:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
Ole Begemann
2009-12-09 00:11:02