Skip to content

Instantly share code, notes, and snippets.

@rraallvv
Created June 14, 2012 09:58
Show Gist options
  • Save rraallvv/2929389 to your computer and use it in GitHub Desktop.
Save rraallvv/2929389 to your computer and use it in GitHub Desktop.
Save NSDictionary to plist file
// save NSDictionary to plist file
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *plistPath = [documentsDirectory stringByAppendingPathComponent:@"myfile.plist"];
NSLog(@"%@", plistPath);
[myNSDictionary writeToFile:plistPath atomically: YES];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment