7. Core Data

Core Data is, in many ways, a replacement for our application’s model layer. It is much more than just storage; it also manages the life cycles of our data objects, tracks and validates any changes to our data, provides effortless undo support, and, yes, saves our data to disk. The UIManagedDocument class only further improves on Core Data, automatically setting up our Core Data stack, managing file input and output on background threads, and adding simple iCloud integration. In this chapter, we will look at the technologies underlying both Core Data and UIManagedDocument. Then we will replace Health Beat’s entire model layer with a UIManagedDocument-based model. As you will see, this provides a much simpler, much more robust system ...

Get Creating iOS 5 Apps: Develop and Design 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.