Amir
Amir

Reputation: 455

NSMutableArray and saving to a file

I have a class called Shop that contains data members (NSString, NSInteger and NSMutableArray that contain another class (that also has NSString and NSInteger).
Now if I use NSMutableArray to hold a list of Shops, what is the best way to save the list to a file and load it later?
Again the class Shop contains data members that is another class; both of the classes have NSString and NSInteger (maybe also NSData and NSDate).

I heard something about archiver??

Thanks.

Upvotes: 0

Views: 1058

Answers (1)

bbum
bbum

Reputation: 162712

Exact same as problem writing a NSMutableArray to file in cocoa

You have non-plist objects in your array and need to use NSArchiver.

Upvotes: 1

Related Questions