Contents

persistentStoreCoordinator

The persistent store coordinator of the context.

Declaration

var persistentStoreCoordinator: NSPersistentStoreCoordinator? { get set }

Return Value

The persistent store coordinator of the receiver.

Discussion

The coordinator provides the managed object model and handles persistency. Note that multiple contexts can share a coordinator. May not be nil.

Setting persistentStoreCoordinator to nil will raise an exception. If you want to “disconnect” a context from its persistent store coordinator, you should simply set all strong references to the context to nil and allow it to be deallocated normally.

For more details, see Parent store.

See Also

Configuring a context