UUIDDeviceIdentifier
public actor UUIDDeviceIdentifier : DeviceIdentifier, Sendable
A fallback device identifier that uses a UUID when key pair generation fails. It generates and persists a UUID, then computes the ID by hashing the UUID’s bytes. Example usage:
let deviceId = UUIDDeviceIdentifier()
let identifier = try await deviceId.id
-
idAsynchronousThe unique identifier for the device, computed from a persisted UUID. This identifier is either retrieved from the keychain or generated if it does not exist.
Declaration
Swift
public var id: String { get async throws } -
Initializes a new instance of
UUIDDeviceIdentifier.Declaration
Swift
public init(logger: Logger? = nil)Parameters
loggerAn optional logger to log events. Defaults to
nil.
View on GitHub