Classes
The following classes are available globally.
-
An instance of
CoreDataStack
encapsulates the entire Core Data stack. It manages the managed object model, the persistent store coordinator, and managed object contexts.It is composed of a main context and a background context. These two contexts operate on the main queue and a private background queue, respectively. Both are connected to the persistent store coordinator and data between them is perpetually kept in sync.
Changes to a child context are propagated to its parent context and eventually the persistent store when saving.
Warning
You cannot create aCoreDataStack
instance directly. Instead, use aCoreDataStackProvider
for initialization.Declaration
Swift
public final class CoreDataStack
extension CoreDataStack: Equatable
extension CoreDataStack: CustomStringConvertible