Objective-C Language NSDictionary à NSData


Exemple

NSDictionary *myDictionary = [[NSDictionary alloc] initWithObjectsAndKeys:@"value1", @"key1", @"value2", @"key2", nil];  
NSData *myData = [NSKeyedArchiver archivedDataWithRootObject:myDictionary];

Chemin de réserve:

NSDictionary *myDictionary = (NSDictionary*) [NSKeyedUnarchiver unarchiveObjectWithData:myData];