title: How can I overwrite the contents of a plist file? (iPhone / iPad)
body: <p>I have a plist file in my main app bundle that I want to update via my app. Here is the code I'm using, the problem is that the plist doesn't seem to be getting updated. Is my code incorrect or is there another issue?</p>
  
  <pre><code>// Data
  NSMutableDictionary *data = [[NSMutableDictionary alloc] init];
  [data setObject:self.someValue forKey:@"Root"];
  
  // Save the logs
  NSString *filepath = [[NSBundle mainBundle] pathForResource:@"MyFile" ofType:@"plist"];
  [data writeToFile:filepath atomically:YES];
  </code></pre>
  
  <p>Please can someone help me out?</p>