Contents

viewContext

The main queue’s managed object context.

Declaration

var viewContext: NSManagedObjectContext { get }

Mentioned in

Discussion

This property contains a reference to the NSManagedObjectContext that is created and owned by the persistent container which is associated with the main queue of the application. This context is created automatically as part of the initialization of the persistent container.

This context is associated directly with the NSPersistentStoreCoordinator and is non-generational by default.

See Also

Acquiring Contexts