<!--
{
  "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/AppIntent/requestConfirmation(conditions:actionName:dialog:showDialogAsPrompt:snippetIntent:)-3vewj",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "App Intents",
      "AppIntents"
    ],
    "preciseIdentifier" : "s:10AppIntents0A6IntentPAAE19requestConfirmation10conditions10actionName6dialog18showDialogAsPrompt07snippetC0yAA0E10ConditionsV_AA0e6ActionH0VAA0cK0VSgSbqd__tYaKAA07SnippetC0Rd__lF"
  },
  "title" : "requestConfirmation(conditions:actionName:dialog:showDialogAsPrompt:snippetIntent:)"
}
-->

# requestConfirmation(conditions:actionName:dialog:showDialogAsPrompt:snippetIntent:)

Displays a confirmation prompt that includes an interactive snippet.

```
func requestConfirmation<Snippet>(conditions: ConfirmationConditions = [], actionName: ConfirmationActionName = .`continue`, dialog: IntentDialog? = nil, showDialogAsPrompt: Bool = true, snippetIntent: Snippet) async throws where Snippet : SnippetIntent
```

## Parameters

`conditions`

The conditions to check before asking for confirmation.

`actionName`

The action associated with the request. The system puts the action name
in the button that confirms the action.

`dialog`

The localized text you want the confirmation request to display or speak.

`showDialogAsPrompt`

`true` to include the contents of the `dialog` parameter in
the confirmation interface. Specify `false` to omit the dialog from the interface.

`snippetIntent`

The snippet to display in the confirmation interface.

## Discussion

Call this method when you want someone to confirm a particular choice. For example, call this
method before someone performs an action that might be destructive or unsafe. The
method displays a confirmation interface that includes the provided snippet and optional dialog text.
The interface asks the person to confirm or cancel the operation, and returns normally
if the person confirms the operation. If the person chooses the cancel option, the method
throws an error.

The code that shows your snippet can potentially modify parameter values in your app intent
type. After this function returns, retrieve the latest values from properties instead of
relying on cached versions of that data.

---

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)