iphone - Problem with writeToFile with array of NSDictionary objects -


I have one on iPhone. I am trying to write an array of NSDictionary objects in the Plist file. (They are actually NSCFDictionary objects when I call [Object Class] method). My problem is that it will not write the file if I set the array to "blue" then creates at least empty plast file, but if I have these objects in the array I will not do this.

My array is a parsed response from the JSON HTTP request and looks like this:

  {"title" = "a movie"; "Time_length" = "3:22"; }, {"Title" = "other movie"; "Time_long" = "1:40"; }, {"Title" = "a third movie"; "Time_length" = "2:10"; }  

The code to create the file is:

  [write the array of files: [self-data-file path] atomically: yes]; - (NSString *) Data Path Path {NSArray * path = NSSearchPathForDirectoriesInDomains (NSD Document Directory, NSUserDomainMask, Yes); NSString * document directory = [path item overindexx: 0]; Return [Document Directory Stringbacking Path Component: @ "Data.plist"];  

}

Can I have to stop the NCSFX class of objects in my array from writing me? Thanks for your help.

-writeToFile should work by assuming each object, no matter how 'deep' your original array, Either an NSNumber, an NSString, an NSDate, an NSBoolean, a NSDictionary, or an NSArray. If there is an object of any other object, then it will fail.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -