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

# IntentValueRepresentation

A transfer representation that enables bidirectional conversion between app entities
and system intent values.

```
struct IntentValueRepresentation<Item, IntentValue> where Item : Transferable, IntentValue : _IntentValue, IntentValue : Sendable
```

## Overview

`IntentValueRepresentation` bridges the gap between your custom `AppEntity` types
and system-provided intent values (like `IntentPerson`, `PlaceDescriptor`, and other
`_SystemIntentValue` types).

## Export and Import

You can create a representation that supports export only, or both export and import:

```swift
// Export only
ValueRepresentation(
    exporting: { entity in
        IntentPerson(name: .displayName(entity.name))
    }
)

// Bidirectional
ValueRepresentation(
    exporting: { entity in
        IntentPerson(name: .displayName(entity.name))
    },
    importing: { person in
        ContactEntity(name: person.name.displayString)
    }
)
```

## Key Path-Based Export

For entities that directly contain a system intent value property, you can use
a simplified key path syntax:

```swift
struct LocationEntity: TransientAppEntity, Transferable {
    @Property
    var place: PlaceDescriptor

    static var transferRepresentation: some TransferRepresentation {
        ValueRepresentation(exporting: \.place)
    }
}
```

---

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)