Contents

NSPersistentContainer

A container that encapsulates the Core Data stack in your app.

Declaration

class NSPersistentContainer

Mentioned in

Overview

NSPersistentContainer simplifies the creation and management of the Core Data stack by handling the creation of the managed object model (NSManagedObjectModel), persistent store coordinator (NSPersistentStoreCoordinator), and the managed object context (NSManagedObjectContext).

Topics

Creating a Container

Getting the Container’s Configuration

Accessing the Default Directory

Managing Persistent Stores

Acquiring Contexts

Performing Background Tasks