NSManagedObjectContextDidSaveObjectIDs
A notification that posts after a context finishes writing changes.
Declaration
static let NSManagedObjectContextDidSaveObjectIDs: NSNotification.NameDiscussion
This notification’s object is the saved context. Don’t peform any asynchronous work or block the calling thread. NSManagedObjectContext posts notifications to the same thread that creates it.
The userInfo dictionary contains the identifiers of the inserted, updated, deleted, and invalidated managed objects. For the keys to access those objects, see NSManagedObjectContext.NotificationKey. It’s safe to capture the dictionary’s contents.
Use this notification instead of NSManagedObjectContextDidSave if you intend to process the changed managed object on a different thread. It’s safe to pass instances of NSManagedObjectID across thread boundaries.
See Also
Core Data
NSManagedObjectContextDidSaveNSManagedObjectContextObjectsDidChangeNSManagedObjectContextWillSaveNSPersistentStoreCoordinatorStoresDidChangeNSPersistentStoreCoordinatorStoresWillChangeNSPersistentStoreCoordinatorWillRemoveStoreNSCoreDataCoreSpotlightDelegateIndexDidUpdateNSManagedObjectContextDidMergeChangesObjectIDsNSPersistentStoreRemoteChangeNSPersistentStoreDidImportUbiquitousContentChanges