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.
Asked
Active
Viewed 835 times
0
-
[data writeToFile:plistPath atomically:YES]; – user635064 Jun 11 '11 at 06:44
-
:) That much I guessed. Where are you writing to? – Deepak Danduprolu Jun 11 '11 at 06:45
2 Answers
1
Use NSData - writeToFile:options:error: instead and see what does the returned error (NSError) say.

Julio Gorgé
- 10,056
- 2
- 45
- 60
-
2@user635064 See [`this`](http://stackoverflow.com/questions/1286212/how-to-convert-nsarray-to-nsdata) for converting an `NSArray` to `NSData`. – Deepak Danduprolu Jun 11 '11 at 06:47