I keep some settings in a plist.
I've the following methods to open the plist and then save it again when I'm done.
In simulator this works just fine, whatever I change in my settings gets written to the plist and I'm able to read the updated values from my main application then.
Testing this on a physical iPhone yield a slightly different result - in that the file isn't updated. I dp get printed in the log "It this called at all??? - Yes it is..." but that's it, no other errors or anything.
Anyone have any idea what the problem might be or how to troubleshoot this one?? I'm a bit stuck as it's working perfectly in the simulator...
I've the following methods to open the plist and then save it again when I'm done.
Code:
NSString *path = [[NSBundle mainBundle] bundlePath];
NSString *filePath = [path stringByAppendingPathComponent:@"MySettings.plist"];
MySettingsDictionary = [[NSMutableDictionary alloc]
initWithContentsOfFile:filePath];
Code:
- (void)save:(NSDictionary *)saveData {
NSString *path = [[NSBundle mainBundle] bundlePath];
NSString *filePath = [path stringByAppendingPathComponent:@"MySettings.plist"];
[saveData writeToFile:filePath atomically:YES];
NSLog(@"It this called at all??? - Yes it is...");
}
In simulator this works just fine, whatever I change in my settings gets written to the plist and I'm able to read the updated values from my main application then.
Testing this on a physical iPhone yield a slightly different result - in that the file isn't updated. I dp get printed in the log "It this called at all??? - Yes it is..." but that's it, no other errors or anything.
Anyone have any idea what the problem might be or how to troubleshoot this one?? I'm a bit stuck as it's working perfectly in the simulator...