<!--
{
  "availability" : [
    "iOS: 27.2.0 -",
    "iPadOS: 27.2.0 -",
    "macCatalyst: -",
    "macOS: 27.2.0 -",
    "tvOS: 27.2.0 -",
    "visionOS: 27.2.0 -",
    "watchOS: 27.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/IntentValueRepresentation/init(importing:)-7cl3z",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "App Intents",
      "AppIntents"
    ],
    "preciseIdentifier" : "s:10AppIntents25IntentValueRepresentationVA2A07_SystemcD0R_rlE9importingACyxq_Gxq_YaYbKc_tcfc"
  },
  "title" : "init(importing:)"
}
-->

# init(importing:)

Creates a value representation that imports a system intent value into an entity.

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

## Parameters

`importing`

A closure that converts a system intent value to an entity.

## Discussion

Use this initializer when your entity can be created from a system type, but has no
meaningful representation to export back out. The entity’s metadata declares the system
type as importable only, and the entity is never offered for export as that type.

## Example

```swift
struct LocationEntity: AppEntity, Transferable {
    static var transferRepresentation: some TransferRepresentation {
        IntentValueRepresentation(
            importing: { place in
                guard let coordinate = place.coordinate else {
                    throw ImportError.missingCoordinate
                }
                return LocationEntity(
                    name: place.commonName ?? "Unknown Location",
                    latitude: coordinate.latitude,
                    longitude: coordinate.longitude
                )
            }
        )
    }
}
```

---

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)