I am creating a multiplayer game and I am looking for a way to store an array in a file like you would in other languages. technically I want to specify a file to dump an array into a file and then read it as an array.
For example, in PHP there are the var_dump() , var_export() or print_r() functions. Perl has the Data Dumper CPAN class, etc etc.
is there a way to do the same in Objective-C?
Yes there is.
[yourNSArray writeToFile:filePath atomically:YES];http://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html#//apple_ref/occ/instm/NSArray/writeToFile:atomically: