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

# init(id:)

Creates an identifier where the local and stable IDs are identical.

```
init(id: LocalID)
```

## Discussion

Use this for entities whose identifiers are already stable across devices,
such as server-assigned UUIDs or globally unique identifiers.

## Example

```swift
struct Article: AppEntity, SyncableEntity {
    var id: SyncableEntityIdentifier<UUID, UUID>

    init(id: UUID, title: String) {
        self.id = SyncableEntityIdentifier(id: id)
        self.title = title
    }
}
```

---

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)