Contents

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

Requests user confirmation before performing the app intent.

Declaration

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

Parameters

  • conditions:

    The preconditions for requesting user confirmation.

  • actionName:

    The name for the confirmation action.

  • dialog:

    The confirmation dialog.

  • showDialogAsPrompt:

    A flag that indicates whether the confirmation dialog should appear as prompt text with the confirmation.

  • snippetIntent:

    The intent responsible for presenting a snippet for this confirmation.

Return Value

The returned value of the Snippet Intent Perform Result

Discussion

The function displays an interactive snippet as a result of the app intent if a person confirms the action and otherwise throws an error.