NSDictionary from NSData
http://www.cocoanetics.com/2009/09/nsdictionary-from-nsdata/
NSDictionary to NSData
You can use NSPropertyListSerialization class for that. Have a look at its method:
+ (NSData *)dataFromPropertyList:(id)plist format:(NSPropertyListFormat)format
errorDescription:(NSString **)errorString
Returns an NSData object containing a given property list in a specified format.