
Archiving, Serialization, and Distribution 9 479
There are two parts to this process. First, store the name of the
class in addition to the data. In the underlined code of prop-
ertyListRepresentation, the name of your object's class
is retrieved and stored in the dictionary that will serialize the
object's data.
On retrieval, convert the class name string to an actual class.
Then create an instance of this class. (The two necessary lines
of code are underlined.) Note that in Java, you need to coerce
the NSObject result of newInstance to your own class.
This recipe is from the Sketch example, and its use there is
typical. In Sketch, ...