---
title: NSManagedObjectContextDidSaveNotification
framework: coredata
role: symbol
role_heading: Global Variable
path: coredata/nsmanagedobjectcontextdidsavenotification
---

# NSManagedObjectContextDidSaveNotification

A notification that posts after a context finishes writing unsaved changes.

## Declaration

```occ
extern NSString * const NSManagedObjectContextDidSaveNotification;
```

## Discussion

Discussion important: Use NSManagedObjectContextDidSaveObjectIDsNotification instead of this notification. 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 inserted, updated, and deleted managed objects of the completed save. For the keys to access those objects, see NSManagedObjectContext.NotificationKey. Don’t capture the dictionary’s contents. To safely use the provided managed objects on the current thread, create a new context and use its mergeChanges(fromContextDidSave:) method to merge in the notification’s changes.
