<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/UndoableIntent/undoManager",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "App Intents",
      "AppIntents"
    ],
    "preciseIdentifier" : "s:10AppIntents14UndoableIntentPAAE11undoManagerSo06NSUndoF0CSgvp"
  },
  "title" : "undoManager"
}
-->

# undoManager

The undo manager you use to register undo actions for your app intents.

```
@MainActor var undoManager: UndoManager? { get }
```

## Discussion

In your app intent’s [`perform()`](/documentation/AppIntents/AppIntent/perform()) method, use this property to get an undo
manager suitable for registering undoable actions. The system makes every effort to
find a suitable undo manager given the current state of your app or app extension.
However, if a suitable undo manager isn’t available, the value of this property is `nil`.

Use the undo manager in this property only to register your undoable actions. App intents
don’t initiate calls to the <doc://com.apple.documentation/documentation/Foundation/UndoManager/undo()>
or <doc://com.apple.documentation/documentation/Foundation/UndoManager/redo()> methods of
the undo manager. Your app initiates undo and redo operations in response to interactions
with its menus or interface.

---

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)