Instance Property


The document’s managed object context.


var managedObjectContext: NSManagedObjectContext { get }


The document automatically creates a managed object context using its persistent store coordinator.

Special Considerations

You must not use the document’s managed object context in writeAdditionalContent(_:to:originalContentsURL:), or any of the asynchronous UIDocument methods.

See Also

Managing the Core Data Stack

var managedObjectModel: NSManagedObjectModel

The document’s managed object model.

var persistentStoreOptions: [AnyHashable : Any]?

Options used when creating the document’s persistent store.

var modelConfiguration: String?

A model configuration name to be passed when configuring the persistent store.

func persistentStoreType(forFileType: String) -> String

Returns the Core Data store type for a given document file type.