Global Variable

NSManagedObjectContextDidSaveNotification

A notification that the context completed a save.

Declaration

NSString *const NSManagedObjectContextDidSaveNotification;

Discussion

The notification object is the managed object context. The userInfo

dictionary contains the following keys: NSInsertedObjectsKey, NSUpdatedObjectsKey, and NSDeletedObjectsKey.

You can only use the managed objects in this notification on the same thread on which it was posted.

You can pass the notification object to mergeChangesFromContextDidSaveNotification: on another thread, however you must not use the managed object in the user info dictionary directly on another thread. For more details, see Concurrency with Core Data.

See Also

Managing Notifications

NSManagedObjectContextObjectsDidChangeNotification

A notification of changes made to managed objects associated with this context.

NSManagedObjectContextWillSaveNotification

A notification that the context is about to save.

NSInsertedObjectsKey

A key for the set of objects that were inserted into the context.

NSUpdatedObjectsKey

A key for the set of objects that were updated.

NSDeletedObjectsKey

A key for the set of objects that were marked for deletion during the previous event.

NSRefreshedObjectsKey

A key for the set of objects that were refreshed but were not dirtied in the scope of this context.

NSInvalidatedObjectsKey

A key for the set of objects that were invalidated.

NSInvalidatedAllObjectsKey

A key that specifies that all objects in the context have been invalidated.

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