I have an NSDictionary
(which I get from querying in sqlite) which contains bytes. Here is a sample:
Rects = "<62706c69 73743030 d4010203 04050824 25542474 6f705824 6f626a65 63747358 24766572 73696f6e 59246172 63686976...
I want to convert this using the NSKeyedUnarchiver
, but what is the right way to do it?
This is what I did:
NSData *data = [rectDict objectForKey:@"Rects"];
NSArray *rectArray = [NSKeyedUnarchiver unarchivedObjectWithData:data];
But this returns NULL. How will I do this?
NOTE: I used NSArray
as the unarchiver because the data to be unarchived is an array containing custom objects.
UPDATE: To clarify, the dictionary contains the archived object. The whole dictionary is not archived, just the content. That's what I'm trying to get.