放在項目中的plist的不能寫入奢赂。需要放到沙盒中操作。
一,讀韧ハА:
NSMutableDictionary *dataDic = [NSMutableDictionary dictionaryWithContentsOfFile:self.plistPath];
二、寫入:
NSMutableDictionary *dataDic = [NSMutableDictionary dictionaryWithContentsOfFile:self.plistPath];
[dataDic setObject:@""forKey:@"password"];
[dataDic writeToFile:self.plistPath atomically:YES];
注意:寫入對象不能不為nil