17. Working with Core Data and iCloud

In Chapter 10, “Managing Persistent Storage with Core Data,” you saw the basics of Core Data and an overview of relevant database theory. Throughout Part IV of the book, you have seen how to use iCloud in various contexts—with file wrappers (Chapter 14), iOS documents (Chapter 15), and OS X documents (Chapter 16). Core Data can fit into any of those contexts.

For example, you can use a file wrapper to wrap a file that contains a Core Data store and the necessary code for the Core Data stack to access it. You can add the store and Core Data stack support to a subclass of UIDocument (it is called UIManagedDocument). On OS X, NSPersistentDocument is a subclass of NSDocument and is functionally comparable to ...

Get Learning iCloud Data Management: A Hands-On Guide to Structuring Data for iOS and OS X now with O’Reilly online learning.

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