IntentDefinitions
A collection of definitions that catalog your app’s intents, enums, entities, and queries.
Declaration
struct IntentDefinitionsMentioned in
Overview
Use the IntentDefinitions structure as the entry point for creating type-erased app intents for testing. Provide the bundle identifier of the app under test, then use subscript syntax to retrieve definitions for intents, entities, enums, or value queries as shown in the following example:
let definitions = IntentDefinitions(
bundleIdentifier: "com.apple.example"
)
let intent = definitions.intents["OrderCoffeeIntent"]
.makeIntent(size: "large")
let entity = definitions.entities["CoffeeEntity"]
.makeReference(identifier: "latte-123")
let enumCase = definitions.enums["CoffeeSizeEnum"]
.makeCase("large")Topics
Creating an intent definition
Accessing app intents
Accessing app entities and queries
entitiesAppEntityDefinitionvalueQueriesIntentValueQueryDefinitiontransientEntitiesTransientAppEntityDefinition