DevPrep

All topics › Databases & storage

Core Data

Middle PRO

Essence

Core Data is Apple's framework for managing a model's object graph and persisting it to disk. It is neither a database nor an ORM in the classic sense: you work with objects (NSManagedObject), their attributes and relationships, and Core Data handles change tracking, lazy loading (faulting), undo/redo, validation, schema migrations and, optionally, CloudKit sync. The store is most often SQLite, but that's an implementation detail: a binary or in-memory store works too.

The rest of this answer, with code and interview follow-ups, is in the DevPrep app.

Read the full answer in DevPrep

Practice this before your interview

DevPrep turns these answers into one-minute challenges: what does this code print, find the bug, mock interviews. One challenge a day.

Get DevPrep on the App Store