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 O’Reilly online learning.

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