9. Introducing Core Data

For many apps, presentation is just one key part of their value. Without data, there is nothing to present. And for many apps, the data has to persist. In the CarValet app, so far the data has been temporary: If you or the system removes the app from memory, the data is gone; build and download, crash, or reboot, and again the data is gone. You need a way to store data between app launches.

iOS offers several ways to do this: You can put the raw objects in a file, translate the objects and relationships into XML and put that in a file, or even create your own SQLite database. No matter which way you choose, there are a bunch of routines to write, including routines for saving a car, reading a car, finding a car, deleting ...

Get Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.