1 NSMutableDictionary *mDic = [[NSMutableDictionary alloc] initWithCapacity:1];
2 [mDic setValue:@"test1" forKey:@"test1"];
3 [mDic setValue:@"test2" forKey:@"test2"];
4 [mDic setValue:@"test3" forKey:@"test3"];
5 [mDic setValue:@"test4" forKey:@"test4"];
6 [mDic setValue:@"test5" forKey:@"test5"];
7
8 NSLog(@"mdic = %@", mDic);
9
10 NSMutableData *mData = [[NSMutableData alloc] init];
11 NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:mData];
12 [archiver encodeObject:mDic forKey:@"mutDic"];
13 [archiver finishEncoding];
14 NSLog(@"mdata = %@", mData);