writeToFile fails on iphone but works on simulator
<p>NSString *myfile = [[NSBundle] mainBundle] pathForResource:@"fileName" ofType:@"plist"];</p>

<p>NSMutableArray *mydata= [[NSMutableArray alloc] initWithContentsOfFile:myfile];</p>

<p>/* code to modify mydata */</p>

<p>[mydata writeToFile:myfile atomically:YES]</p>

<p>In case of simulator 'fileName.plist' is modified but in case of iphone device file remains unchanged. There is no exception seen either.</p>

<p>Is the above code expected to work fine on both iphone and simulator ?</p>

<p>Also in the debugger when I hover over 'mydata' I see different values in case of simulator and device. In case of simulator I see for example, '5 objects' but in case of actual device it shows '{(int)[$VAR count]}'. Could this be related to file not being written ?</p>
