<!--
{
  "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/init(exporting:)-7wi2e",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "App Intents",
      "AppIntents"
    ],
    "preciseIdentifier" : "s:10AppIntents25IntentValueRepresentationVA2A0C6PersonVRs_rlE9exportingACyxAEGAExYaYbKc_tcfc"
  },
  "title" : "init(exporting:)"
}
-->

# init(exporting:)

Creates a value representation that exports an entity to an `IntentPerson`.

```
init(exporting: @escaping @Sendable (Item) async throws -> IntentValue)
```

## Parameters

`exporting`

A closure that converts an entity to an IntentPerson.
This closure is called when the system needs to transfer your entity across
process boundaries or export it for use by other apps or system features.

## Discussion

Use this initializer when you only need to export your entity to an IntentPerson,
without supporting import back into your entity type.

## Example

```swift
struct ContactEntity: AppEntity, Transferable {
    static var transferRepresentation: some TransferRepresentation {
        IntentValueRepresentation(
            exporting: { entity in
                IntentPerson(
                    identifier: .applicationDefined(entity.id),
                    name: .displayName(entity.name),
                    handle: .init(emailAddress: entity.email)
                )
            }
        )
    }
}
```

---

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)