There are many other ways to save and load files in Cocoa, but once you have mastered the techniques presented in this chapter, you'll find that the others are easy to assimilate.
You have learned the following in this chapter:
- The various methods available for using the default UserDefaults object
- Loading objects with default values
- Saving structured data
- The NSCoding protocol and NSKeyedArchiver methods
- How to create, store, and load NSCoding--compliant classes
- Convenience methods for writing some data types to disk
- Special methods for saving and retrieving text
- How to offer the user the standard system open and save dialog boxes
The next chapter, as already mentioned, will cover Cocoa's Core Data framework, with which we will perform more advanced operations around saving, retrieving, and querying data on disk.