All quizzes
Free quiz · 20 questions in the bank

Core Data quiz

Test your Core Data knowledge with a free interactive quiz — 20 questions with answers and explanations. No signup needed to play.

Question 1/5Score 0

What is the role of `NSPersistentContainer`?

Questions in this quiz
  1. What is the role of `NSPersistentContainer`?
  2. What is `@FetchRequest` in SwiftUI, and how does it relate to Core Data?
  3. What does `NSManagedObjectContext.mergePolicy` control?
  4. What does `viewContext` refer to on an `NSPersistentContainer`?
  5. Why does Core Data avoid loading an entire large dataset into memory when displaying, say, thousands of records?
  6. What is the difference between a Core Data "attribute" and a "relationship" on an entity?
  7. What does `NSBatchDeleteRequest` provide that a normal fetch-then-delete loop doesn't?
  8. What does `NSPredicate(format: "age > %d", 18)` do when attached to a fetch request?
  9. What is Core Data with CloudKit integration (`NSPersistentCloudKitContainer`) used for?
  10. What happens if you call `context.save()` and it throws an error — what is a common cause?
  11. What must you do after modifying properties on a fetched `NSManagedObject` to persist the change?
  12. What is `NSFetchRequest` used for?
Gaps to close?
Read the curated Core Data notes — core concepts, patterns, interview prep.
Core Data notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web