tags:

views:

50

answers:

1

hello all,
I have class named Shop that contain data members (NSString , NSInteger and nsmutablearray that contain another class(that have also NSString and NSInteger)
Now if i use nsmutablearray to hold alist of Shops what is the best way to save the list to file and load it later?
again the class Shop contain data memeber that is another class both of the classes have NSString and NSinteger (maybe also NSdata and NSdate)

i heard somthing about archiver??

thanks.

+1  A: 

Exact same as http://stackoverflow.com/questions/751093/problem-writing-a-nsmutablearray-to-file-in-cocoa

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

bbum
I still didnt understand , does NSArchiver will save all of NSArray list of Shops object to file? (even if Shop have data member like NSArray ) ??what the difference between NSArchiver to Serializing?
Amir
Did you read this document http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Archiving/Archiving.html that was linked to in the dupe's answer?
bbum