I am developing a guest list(NSMutableArray) and I would like to know If can I create and save this Array in any kind of external file such as .txt .pdf (or another extension)?
Any ideas for do this??
Thanks a lot.
I am developing a guest list(NSMutableArray) and I would like to know If can I create and save this Array in any kind of external file such as .txt .pdf (or another extension)?
Any ideas for do this??
Thanks a lot.
NSArray (which is what NSMutableArray derives from) has a "writeToURL:atomically:
" method, which takes a file URL.
Now, if your array contains ONLY objects of the Objective-C types NSString, NSData, NSDate, NSNumber, NSArray or NSDictionary, you should be okay. If you have some custom objects, you'll need to write archiving / unarchiving coder methods which will allow those custom object's data to be written out to a file and read from a file.