Reputation: 659
I can't work out why it keeps failing. It returns NO
. I have searched this all afternoon, but nothing explains why or how to fix. Calling [[NSFileManager defaultManager] isWritableFileAtPath:]
returns NO
, which leads me to believe that the existing plist file can not be overwritten, but I can't work out how to change this.
Upvotes: 2
Views: 2900
Reputation: 6263
You can write ONLY files in Documents directory. But your plist file is not there
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
Upvotes: 3