SyncableEntityIdentifier
struct · iOS 27.0+ · SDK 27.1
struct SyncableEntityIdentifier<LocalID, StableID> where LocalID : EntityIdentifierConvertible, LocalID : Sendable, StableID : EntityIdentifierConvertible, StableID : SendableA type-safe wrapper you use to specify different local and stable identifiers for an entity. Use this structure if you maintain separate local and stable identifiers in one of your entity types. Assign this structure to the `id` property of your entity and use the value in the ``SyncableEntityIdentifier/local`` property to refer to the entity in your code. The system uses the ``SyncableEntityIdentifier/stable`` value to refer to the same entity during operations that occur on another device. When referring to an entity in your code, you can refer to this type directly. The following example shows an entity that uses this type for its identifier. The query object for the entity similarly refers to this type directly in methods. ```swift struct Photo: AppEntity, SyncableEntity { var id: SyncableEntityIdentifier<String, String> var creationDate: Date } struct PhotoQuery: EntityQuery { func entities(for ids: [SyncableEntityIdentifier<String, String>]) async throws -> [Photo] { // Works everywhere - queries, entities, helper functions } } ``` For additional information about how to use this type, see ``SyncableEntity``.
Members (0)
This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.
Skipped declarations
5 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
SyncableEntityIdentifier.local
This declaration needs Swift generic type arguments. (no canonical witness for LocalID)
SyncableEntityIdentifier.stable
This declaration needs Swift generic type arguments. (no canonical witness for StableID)
SyncableEntityIdentifier.init(local:stable:)
This declaration needs Swift generic type arguments. (no canonical witness for LocalID)
SyncableEntityIdentifier.entityIdentifier(for:)
The containing type needs Swift generic type arguments. (no canonical witness for LocalID, StableID)
SyncableEntityIdentifier.init(id:)
This declaration needs Swift generic type arguments. (no canonical witness for LocalID)