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

# processPendingChanges()

Forces the context to process changes to the object graph.

```
func processPendingChanges()
```

## Discussion

This method causes changes to registered managed objects to be recorded with the undo manager.

In AppKit-based applications, this method is invoked automatically at least once during the event loop (at the end of the loop)—it may be called more often than that if the framework needs to coalesce your changes before doing something else. You can also invoke it manually to coalesce any pending unprocessed changes.

## See Also

[`-  undo`](/documentation/CoreData/NSManagedObjectContext/undo())

Sends an undo message to the context’s undo manager, asking it to reverse the latest uncommitted changes applied to objects in the object graph.

[`undoManager`](/documentation/CoreData/NSManagedObjectContext/undoManager)

The object that provides undo support for the context.

[`-  redo`](/documentation/CoreData/NSManagedObjectContext/redo())

Sends a redo message to the context’s undo manager, asking it to reverse the latest undo operation applied to objects in the object graph.



---

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)