<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSManagedObjectContext/mergeChanges(fromContextDidSave:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSManagedObjectContext(im)mergeChangesFromContextDidSaveNotification:"
  },
  "title" : "mergeChanges(fromContextDidSave:)"
}
-->

# mergeChanges(fromContextDidSave:)

Merges the changes specified in a given notification.

```
func mergeChanges(fromContextDidSave notification: Notification)
```

## Parameters

`notification`

An instance of an <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/NSManagedObjectContextDidSave> notification posted by another context.

## Discussion

This method refreshes any objects which have been updated in the other context, faults in any newly-inserted objects, and invokes [`delete(_:)`](/documentation/CoreData/NSManagedObjectContext/delete(_:)): on those which have been deleted.

You can pass a <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/NSManagedObjectContextDidSave> notification posted by a managed object context on another thread, however you must not use the managed objects in the user info dictionary directly. For more details, see Concurrency with Core Data.

> Note: Objective-C uses instances of ``doc://com.apple.coredata/documentation/CoreData/NSManagedObjectContextDidSaveNotification`` instead of <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/NSManagedObjectContextDidSave>.

---

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)