<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: -",
    "macOS: 10.5.0 -",
    "tvOS: 3.0.0 -",
    "visionOS: -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSManagedObjectContext/willSaveObjectsNotification",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Core Data",
      "CoreData"
    ],
    "preciseIdentifier" : "s:So22NSManagedObjectContextC8CoreDataE27willSaveObjectsNotificationSo18NSNotificationNameavpZ"
  },
  "title" : "willSaveObjectsNotification"
}
-->

# willSaveObjectsNotification

A notification that posts before a context writes pending changes to disk.

```
static let willSaveObjectsNotification: Notification.Name
```

## Discussion

This notification’s `object` is the context that’s about to save. Only use the notification to operate on the in-process save operation. For example, to insert additional managed objects. Don’t peform any asynchronous work or block the calling thread. [`NSManagedObjectContext`](/documentation/CoreData/NSManagedObjectContext) posts notifications to the same thread that creates it.

There is no `userInfo` dictionary.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)