I am using the following code to write into a plist:
NSMutableArray *d = [[NSMutableArray alloc] initWithContentsOfFile:
[[NSBundle mainBundle] pathForResource:@"FavoritesTaxi" ofType:@"plist"]];
[d addObject:self.dataItem];
// write dictionary to plist
[d writeToFile:[[NSBundle mainBundle] pathForResource:@"FavoritesTaxi" ofType:@"plist"] atomically:YES];
[d release];
I tested this code on 4 different devices( 2 simulators and 2 real iphones). It worked on the following : iPhone 4.3 simulator iPhone 5.0 simulator iPhone 4.3 Real Device
But it didn't work on the following : iPhone 5.0.1 Real Device.
I really do not know why this is happening to this device. Any ideas why? And what is the solution to it?