O'Reilly logo

Objective-C Quick Syntax Reference by Matthew Campbell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 28

image

Object Archiving

Object Archiving Defined

Saving a copy of your app’s object graph to be used later on as a backup is called object archiving. Objective-C has classes that can help you archive your object graph. Each class that supports archiving must adopt the NSCoding protocol and implement two methods needed by the NSKeyedArchiver and NSKeyedUnarchiver classes.

NSCoding

Each class that will support archiving must adopt the NSCoding protocol and implement the required methods. These methods will help the archivers to store the property values stored in the objects that need to be archived.

To adopt the NSCoding protocol, add the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required