writeToFile:atomically: not working in 4.1 SDK and below but works on 4.2 beta SDK
<p>I use the following code to write to the plist (assuming dict is already populated):</p>

<pre><code>[dict writeToFile:[appDelegate dataFilePath] atomically:YES];
</code></pre>

<p>where in my App Delegate:</p>

<pre><code>- (NSString *)dataFilePath {
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    return [documentsDirectory stringByAppendingPathComponent:kFilename];
}
</code></pre>

<p>And I read the plist from disk using this:</p>

<pre><code>NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithContentsOfFile:[appDelegate dataFilePath]];
</code></pre>

<p>This worked when compiling my app for 4.2, but since I brought it down to 4.1 for distribution, it stopped working.</p>

<pre><code>[dict writeToFile:[appDelegate dataFilePath] atomically:YES];
</code></pre>

<p>returns NO. What's wrong here?</p>
