Search code examples
objective-ccocoa-touchnsarrayplistwritetofile

NSArray writeToFile not working first time (but works next time)


I am writing a huge NSArray of NSDictionaries. The file size when successfully written to a plist is about 549KB. The thing is, when I start my app, the first time I try to write it, it always returns NO (i.e. it didn't write), but then the next time it write just fine...Is there any way I can find out exactly what error occurred? Thanks.


Solution

  • Might be your array of dictionaries is empty? Try to debug your app.