<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntentsTesting",
  "identifier" : "/documentation/AppIntentsTesting/AppIntentDefinition",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "App Intents Testing"
    ],
    "preciseIdentifier" : "s:17AppIntentsTesting0A16IntentDefinitionV"
  },
  "title" : "AppIntentDefinition"
}
-->

# AppIntentDefinition

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

```
struct AppIntentDefinition
```

## Overview

To create an app intent instance for testing, instantiate its corresponding intent definition
for your app intent using [`IntentDefinitions`](/documentation/AppIntentsTesting/IntentDefinitions), then create an intent instance
using [`makeIntent`](/documentation/AppIntentsTesting/AppIntentDefinition/makeIntent) as shown in the following example:

```swift
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

[`var makeIntent: IntentValuePropertiesCallable<AnyAppIntent>`](/documentation/AppIntentsTesting/AppIntentDefinition/makeIntent)

Creates a populated instance of this intent.

### Identifying the intent

[`let identifier: String`](/documentation/AppIntentsTesting/AppIntentDefinition/identifier)

The intent’s identifier.

[`let bundleIdentifier: String`](/documentation/AppIntentsTesting/AppIntentDefinition/bundleIdentifier)

The bundle identifier of the app that includes this intent.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

---

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)