<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/AppUnionValue",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents0A10UnionValueP"
  },
  "title" : "AppUnionValue"
}
-->

# AppUnionValue

A protocol that provides nominal type identity and metadata for union values.

```
protocol AppUnionValue : TypeDisplayRepresentable
```

## Overview

Union values conforming to this protocol can be used as Shortcuts parameters
with rich metadata support, enabling appropriate picker UI and parameter summaries.

The `@UnionValue` macro automatically generates conformance to this protocol.
You can provide custom metadata by implementing the protocol requirements
in an extension.

Example:

```swift
@UnionValue
enum Reaction {
    case tapback(Tapback)
    case text(String)
}

extension Reaction {
    static var typeDisplayRepresentation: TypeDisplayRepresentation {
        "Reaction"
    }

    static let caseDisplayRepresentations: [Cases: DisplayRepresentation] = [
        .tapback: "Tapback",
        .text: "Text Reaction"
    ]
}
```

## Relationships

### Inherits From

[`TypeDisplayRepresentable`](/documentation/AppIntents/TypeDisplayRepresentable)

---

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)