Contents

AppIntentDefinition

A definition you use to dynamically create intent instances for testing.

Declaration

struct AppIntentDefinition

Mentioned in

Overview

To create an app intent instance for testing, instantiate its corresponding intent definition for your app intent using IntentDefinitions, then create an intent instance using makeIntent as shown in the following example:

let definitions = IntentDefinitions(
    bundleIdentifier: "com.apple.example"
)
let orderIntent = definitions.intents[
    "OrderCoffeeIntent"
]
let intent = orderIntent.makeIntent(
    size: "large",
    type: "latte"
)

Topics

Creating an app intent instance

Identifying the intent

Instance Properties

See Also

Accessing app intents