<!--
{
  "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/AnyAppIntent",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "App Intents Testing"
    ],
    "preciseIdentifier" : "s:17AppIntentsTesting03AnyA6IntentV"
  },
  "title" : "AnyAppIntent"
}
-->

# AnyAppIntent

A type-erased, intermediate representation of an app intent for testing purposes.

```
@dynamicMemberLookup struct AnyAppIntent
```

## Overview

The [`AnyAppIntent`](/documentation/AppIntentsTesting/AnyAppIntent) structure resolves to your actual app intent type and gives you access to its parameters and
results at runtime, enabling you to test your app intent code as shown in the following example:

```swift
// Getting an intent definition and creating an instance.
let definitions = IntentDefinitions(
    bundleIdentifier: "com.example.app"
)
var intent = definitions.intents["CreateNote"]
    .makeIntent()

// Setting any intent parameters.
intent.title = "Meeting Notes"
intent.priority = 5
intent.isUrgent = true

// Reading parameters, when needed.
let title: String? = try intent.title

// Performing the intent.
let result = try await intent.run()

// Adding your verification code.
// ...
```

## Topics

### Identifying the intent

[`bundleIdentifier`](/documentation/AppIntentsTesting/AnyAppIntent/bundleIdentifier)

The bundle identifier of the app that contains this intent.

[`identifier`](/documentation/AppIntentsTesting/AnyAppIntent/identifier)

The unique identifier for the intent type.

### Performing the intent

[`run()`](/documentation/AppIntentsTesting/AnyAppIntent/run())

Performs the intent in the current test session.



---

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)