Problem with writeToFile with array of NSDictionary objects
<p>I'm trying to write an array of NSDictionary objects to a .plist file on the iPhone (OS 3.0). (They are actually NSCFDictionary objects when I call the [object class] method).  My problem is that it won't write to file.  If I set the array to "nil" it at least creates the empty plist file but won't do it if I have these objects in the array.</p>

<p>My array is a parsed response from a JSON HTTP request and looks like this:</p>

<pre><code>{
    "title" = "A Movie";
    "time_length" = "3:22";
},
{
     "title" = "Another Movie";
     "time_length" = "1:40";
},
{
     "title" = "A Third Movie";
     "time_length" = "2:10";
}
</code></pre>

<p>The code to create the file is:</p>

<pre><code>[array writeToFile:[self dataFilePath] atomically:YES];

- (NSString *)dataFilePath {

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
return [documentsDirectory stringByAppendingPathComponent:@"data.plist"];
</code></pre>

<p>}</p>

<p>Could the NCSFDictionary class of the objects in my array be preventing me from writing to file?  Thanks for your help.</p>
