<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Distributed/DistributedActor/id",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Distributed"
    ],
    "preciseIdentifier" : "s:11Distributed0A5ActorP2id2IDQzvp"
  },
  "title" : "id"
}
-->

# id

Logical identity of this distributed actor.

```
override nonisolated var id: Self.ID { get }
```

## Discussion

Many distributed actor references may be pointing at, logically, the same actor.
For example, calling `resolve(id:using:)` multiple times, is not guaranteed
to return the same exact resolved actor instance, however all the references would
represent logically references to the same distributed actor, e.g. on a different node.

Depending on the capabilities of the actor system producing the identifiers,
the `ID` may also be used to store instance specific metadata.

## Synthesized property

In concrete distributed actor declarations, a witness for this protocol requirement is synthesized by the compiler.

It is not possible to assign a value to the `id` directly; instead, it is assigned during an actors `init` (or `resolve`),
by the managing actor system.

---

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)