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

# AppEnumDefinition

An app enumeration definition for testing and dynamic enumeration creation.

```
struct AppEnumDefinition
```

## Overview

To create an app enum for testing, load the enum definition using [`IntentDefinitions`](/documentation/AppIntentsTesting/IntentDefinitions) and
its [`enums`](/documentation/AppIntentsTesting/IntentDefinitions/enums) property. Then, set its value as shown in the following example:

```swift
let definitions = IntentDefinitions(
    bundleIdentifier: "com.apple.example"
)
let colorEnum = definitions.enums["Color"]
let redCase = colorEnum.makeCase("red") // Matches `Color.red`.
```

## Topics

### Creating an enumeration case

[`func makeCase(String) -> AnyAppEnum`](/documentation/AppIntentsTesting/AppEnumDefinition/makeCase(_:))

Creates an enumeration case with the specified raw value.

### Identifying the enum

[`let typeIdentifier: String`](/documentation/AppIntentsTesting/AppEnumDefinition/typeIdentifier)

The enum type’s unique identifier.

### Default Implementations

[AppIntentTypeDefinition Implementations](/documentation/AppIntentsTesting/AppEnumDefinition/AppIntentTypeDefinition-Implementations)

## Relationships

### Conforms To

[`AppIntentTypeDefinition`](/documentation/AppIntentsTesting/AppIntentTypeDefinition)

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

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

---

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)