Created
June 14, 2012 09:58
-
-
Save rraallvv/2929389 to your computer and use it in GitHub Desktop.
Save NSDictionary to plist file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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