I\'m working on a rss reader. It is just a tableview and each cell shows a custom data model RSSEntry. And I have a NSMutableArray allEntries which contains all RSSEntry I got f
You could store an NSDictionary as following
NSDictionary *Your_NSDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
@"Obj1", @"Key1",
@"Obj2", @"Key2", nil];
//store dictionary
NSMutableData *yourData = [[NSMutableData alloc] init];
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:yourData];
[archiver encodeObject:Your_NSDictionary forKey: @"key"];
archiver finishEncoding];
[yourData writeToFile:@"FilePath" atomically:YES];
[yourData release];
[archiver release];
//Load dictionary
NSData *yourData = [[NSMutableData alloc]initWithContentsOfFile:@"FilePath"];
NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:yourData];
Your_NSDictionary = [unarchiver decodeObjectForKey: @"key"];
[unarchiver finishDecoding];
[unarchiver release];
[yourData release];