Hour 9. Fetching Data

What You’ll Learn in This Hour:

• Identifying the Core Data paradigms

• Learning how Core Data fetches data

• Using managed object contexts

• Creating fetch requests

Choosing the Core Data Architecture

In Hour 4, “Getting the Big Core Data Picture,” you learned how the Core Data stack can be initialized. The basic components are

Data model—This is the data model you create with Xcode. It is normally stored inside your app as a resource that is loaded at runtime.

Persistent store—This is the data itself. It often is stored in the built-in SQLite library on Mac OS and iOS, but it can also be stored in memory on either system or in XML on Mac OS. You can also create your own type of persistent store.

Managed Object ...

Get Sams Teach Yourself Core Data for Mac® and iOS in 24 Hours, Second Edition 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.