Chapter    4

Saving Content in Your App

No matter how great your Cocoa Touch app is, your users aren’t going to be using it forever. They’ll be getting phone calls, switching to other apps, downloading new ones, and even getting new devices. When they come back to your app, they want—and expect—everything to be just as they left it the last time they used it. Their data should be there (and unchanged), and even their user interface should be just as it was the last time they opened the app. Some of this you get by virtue of the app remaining in memory while it isn’t open, but when iOS removes it from memory to reclaim space, you need to be prepared to re-create that data on demand. In this chapter, we’ll discuss how to persist your app’s data ...

Get Learn Cocoa Touch for iOS now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.