I'm using something like the code below to save an NSDictionary of objects to the device. Is there a way to open this archive, drill down into the Dictionary items that it contains and, ideally, edit the data? My guess is no, not reliably, as the optimization done when saving makes the archive difficult to interpret...at least it appears that way when opened with something like Property List Editor. For instance, if some of my objects share a similar NSString it appears that said NSString is only archived once...altering the structure of the NSDictionary from what I had been expecting.
- (BOOL)writeDataToFile {
NSMutableData *data = [[NSMutableData alloc] init];
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
[archiver encodeObject:myDictionary forKey:kDataKey];
[archiver encodeInteger:kDataFileVersion forKey:kDataVersionKey];
[archiver finishEncoding];
BOOL success = [data writeToFile:[self dataFilePath] atomically:YES];
[archiver release];
[data release];
return success;
}