6

I have an NSData that was created by using NSKeyedArchiver. Is there a way to iterate over all the values inside it? It must somehow be possible to get all the keys that were stored in it when using +[NSKeyedUnarchiver unarchiveObjectWithData:].

Thanks

stigi
  • 6,661
  • 3
  • 40
  • 50

1 Answers1

1

A NSKeyedArchived file "simply" is a property list. You would need to find out the structure of that plist, though.

I found the source code of Cocotron very helpful one day, as I tried to decode some NSKeyedUnarchived data: http://code.google.com/p/cocotron/source/browse/Foundation/NSKeyedArchiving/NSKeyedUnarchiver.m (Maybe look at line 39 (initForReadingWithData:) which is called by unarchiveObjectWithData: (line #164)).

Maybe you can find out more about the archived objects that way.

Christian Beer
  • 2,027
  • 15
  • 13