What are the real differences between NSCoding and NSCopying on the low level?
Also, are they supposed to be used independently, together or when is it good to use which one?
NSCopying is closest to what in other languages would be called clone()
, that is, it's used for immediately creating a (functional) new object as a carbon copy of an existing object.
NSCoding is closest to serialize()/deserialize
, that is, it's used for converting objects to a form that can be persistently stored and revived later, possibly when the program is restarted at some other time.
As you can see, they're not very similar in function, and are definitely supposed to be able to be used independently.