modifying a plist is not working

后端 未结 3 1352
陌清茗
陌清茗 2020-12-07 04:47

i have to modify a BOOL value in my plist file stored with the bundle.i am able to access the dictionary which i have to modify .from nslogging i can see that dict is update

3条回答
  •  天涯浪人
    2020-12-07 05:43

    Is there any error

    Check with

    NSError *error = nil
    [dict writeToFile:plistPath atomically:YES encoding:NSASCIIStringEncoding error:&error];
    
    if (error) {
      NSLog(@"Error: %@", [error description]);
    } else {
    NSLog(@"Success");
    }
    

提交回复
热议问题