iOS-plist文件的写读

NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"xiaoli" ofType:@"plist"];
NSMutableDictionary *dataDictionary = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath];
写plist
NSString *filePatch = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)objectAtIndex:0]stringByAppendingPathComponent:@"xiaoli.plist”];
[dic writeToFile:filePatch atomically:YES];
原文地址:https://www.cnblogs.com/WJJ-Dream/p/5786620.html