---
title: AppIntentDefinition
framework: appintentstesting
role: symbol
role_heading: Structure
path: appintentstesting/appintentdefinition
---

# AppIntentDefinition

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

## Declaration

```swift
struct AppIntentDefinition
```

## Mentioned in

Testing your App Intents code

## Overview

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

- [makeIntent](appintentstesting/appintentdefinition/makeintent.md)

### Identifying the intent

- [identifier](appintentstesting/appintentdefinition/identifier.md)
- [bundleIdentifier](appintentstesting/appintentdefinition/bundleidentifier.md)

### Instance Properties

- [withParameters](appintentstesting/appintentdefinition/withparameters.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Accessing app intents

- [intents](appintentstesting/intentdefinitions/intents.md)
