Does NSMutableArray support recursive serialization? E.g. will a NSMutableArray of NSMutableArray's serialize the entirety of the heirarchy out when calling writeToFile?
Example:
NSMutableArray *topArray = [[NSMutableArray alloc] init];
NSMutableArray *bottomArray = [[NSMutableArray alloc] init];
NSString *foo = @"foo";
NSString *bar = @"bar";
NSString *bar2 = @"bar2";
[topArray addObject:foo];
[topArray addObject:bottomArray];
[bottomArray addObject:bar];
[bottomArray addObject:bar2];
[topArray writeToFile:validFilePath atomically:YES];
I am asking as I have 3 string values and an NSMutableArray of NSData objects that I want to stuff into a parent NSMutableArray and serialize out to a file and then reconstitute at a later time. I would like to do this without writing my own NSCoder implementation if possible, take the easy way out.
Thanks.