Saving Content in Your App

  • Jeff Kelley


No matter how great your Cocoa Touch app is, your users aren#x2019;t going to be using it forever. They#x2019;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#x2019;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#x2019;ll discuss how to persist your app#x2019;s data to the disk to save it between launches. Since you have to walk before you run, though, let#x2019;s first discuss how to move data around inside the app; if you can#x2019;t move it inside the app, it#x2019;s going to be difficult to move it outside of the app. Once we discuss moving data around inside your app, we#x2019;ll discuss how to persist that data to disk to make it available between launches.


Core Data System Notification Property List Author Class Cache Directory 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Jeff Kelley 2012

Authors and Affiliations

  • Jeff Kelley

There are no affiliations available

Personalised recommendations