-(void)login{
NSBundle *bundle = [NSBundle mainBundle];
NSString *path = [bundle pathForResource:@"login" ofType:@"plist"];
NSMutableDictionary* plistDict = [[NSMutableDictionary alloc] initWithContentsOfFile:path];
[plistDict setObject:@"si" forKey:@"stato"];
[plistDict writeToFile:path atomically: YES];
}
在 iOS 模拟器中,plist 已正确编写,但是当我尝试在 iPhone 上编写 .plist 时,它不起作用。我想这是因为错误的 .plist 路径。iOS设备是否使用不同的路径?