DevPrep

All topics › Databases & storage

Which store types does Core Data support?

Junior PRO

Essence

The store type is set when a store is attached to the coordinator (NSPersistentStoreDescription.type). On iOS three built-in types are available:

XML (NSXMLStoreType) exists only on macOS — a human-readable format for debugging; it's not available on iOS.

Beyond the built-ins you can write your own store — an NSIncrementalStore subclass (e.g. over a REST API or another database).

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