One Logo Pool Ball
AppIntents · IOS API REFERENCE

UndoableIntent

protocol · iOS 26.0+ · SDK 27.1

protocol UndoableIntent : SystemIntent

An interface you use to register undoable actions in your app intent code. Add support for this protocol if your app intent performs a task that someone might want to undo from your app's interface. This protocol provides access to an instance of the <doc://com.apple.documentation/documentation/foundation/undomanager> type suitable for use in your app intent’s code. You can use this undo manager from either your app or an app extension you use to run app intents. For more information about adding undo support to your code, see the <doc://com.apple.documentation/documentation/foundation/undomanager> type.

Members (1)

get · iOS 26.0+

undoManager

Swift declaration
@MainActor var undoManager: UndoManager? { get }

The undo manager you use to register undo actions for your app intents. In your app intent’s ``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.

Skipped declarations

No declarations were skipped in this snapshot.

All AppIntents types →