Instance Method

observeValue(forKeyPath:of:change:context:)

Allows a context that has registered as an observer of a value to be notified of a change to that value.

Declaration

func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [String : Any]?, context: UnsafeMutableRawPointer?)

See Also

Managing Managed Objects

var shouldDeleteInaccessibleFaults: Bool

A Boolean value that indicates the behavior of inaccessible faults.

var insertedObjects: Set<NSManagedObject>

The set of objects that have been inserted into the context but not yet saved in a persistent store.

var updatedObjects: Set<NSManagedObject>

The set of objects registered with the context that have uncommitted changes.

var deletedObjects: Set<NSManagedObject>

The set of objects that will be removed from their persistent store during the next save operation.

func insert(NSManagedObject)

Registers an object to be inserted in the context’s persistent store the next time changes are saved.

func delete(NSManagedObject)

Specifies an object that should be removed from its persistent store when changes are committed.

func assign(Any, to: NSPersistentStore)

Specifies the store in which a newly inserted object will be saved.

func obtainPermanentIDs(for: [NSManagedObject])

Converts to permanent IDs the object IDs of the objects in a given array.

func detectConflicts(for: NSManagedObject)

Marks an object for conflict detection.

func refresh(NSManagedObject, mergeChanges: Bool)

Updates the persistent properties of a managed object to use the latest values from the persistent store.

func processPendingChanges()

Forces the context to process changes to the object graph.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software