Instance Property

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

init(concurrencyType: NSManagedObjectContextConcurrencyType)

Initializes a context with a given concurrency type.

var parent: NSManagedObjectContext?

The parent of the context.

var name: String?

The developer-provided name of the context.

var userInfo: NSMutableDictionary

The user information for the context.

init()Deprecated