Merges the changes specified in a given notification.
SDKs
- iOS 3.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Core Data
Declaration
func mergeChanges(fromContextDidSave notification: Notification)
Parameters
notification
An instance of an
NSManaged
notification posted by another context.Object Context Did Save
Discussion
This method refreshes any objects which have been updated in the other context, faults in any newly-inserted objects, and invokes delete(_:)
: on those which have been deleted.
You can pass a NSManaged
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.