I assume that here, but would you not indicate a file path pointing to a directory inside your package? I think you can write to the Documents folder under NSBundle.
Try creating the file path as follows:
// Documents directory NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsPath = [paths objectAtIndex:0]; // <Application Home>/Documents/foo.arch NSString *fooPath = [documentsPath stringByAppendingPathComponent:@"foo.arch"];
And then pass "fooPath" as the path to your file in the method you use, see if that helps.
source share