I'm using NSKeyedArchiver to write out an NSDictionary of my app's data to the filesystem.
NSMutableData *data = [[NSMutableData alloc] init];
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
[archiver encodeObject:myAppsDictionary forKey:kDataKey];
[archiver finishEncoding];
BOOL success = [data writeToFile:[self dataFilePath] atomically:YES];
Is there a simple way to attach a version number to this datafile without adding an object to the NSDictionary itself? Could I just insert a line before finishEncoding that would hold a key/value of the version number? Would encodeInt32:forKey: work? Or, is there a more Cocoa friendly way?