Can I get all keys of a NSKeyedUnarchiver?
Asked Answered
E

0

13

I want do something with these step:

  1. Encode a kind of object A with NSKeyedArchiver M and I can get a NSData X.
  2. Init another kind of object B with NSKeyedUnarchiver N from NSData X. The names of A and B are the same, so it's possible(I have done an experiment).
  3. And then I want to encode B, but I do not know wether B lose some data of X, 'cause A and B may have different number of property.

So I want to get all keys and values from N. How can I do this?

I do not understand NSKeyedUnarchiver well, please help me.

Eel answered 24/11, 2010 at 4:41 Comment(2)
Can you explain your application a bit more?Branum
There is no official way to all the keys from NSKeyedUnarchiver. Can you tell us more about why are you trying to transfer the properties from object A to object B?Branum

© 2022 - 2024 — McMap. All rights reserved.