Skip to main content

Overview

final class Seam
Manages the Seam SDK lifecycle: initialization, activation, credential sync, unlock operations, and cleanup.

Instance Properties

credentials

A published list of current credentials, automatically synchronized in the background. Subscribe to updates to refresh your UI or business logic.
@Published var credentials: [SeamCredential] { get set }

isActive

A published Boolean indicating whether the SDK is active. Use this to enable or disable UI or logic based on the SDK’s activation state.
@Published var isActive: Bool { get set }

Instance Methods

activate()

Starts the SDK to begin credential synchronization and processing.
func activate() async throws

deactivate(deintegrate:)

Stops the SDK and releases resources, optionally removing device association.
func deactivate(deintegrate: Bool = false) async
Parameters
ParameterDescription
deintegrateIf true, performs a full deintegration; if false, logs out and retains device endpoints. Defaults to false.

refresh()

Requests the latest credential list and updates the published credentials property.
func refresh() async throws -> [SeamCredential]

unlock(using:proximity:timeout:)

Unlocks a door or device using the given credential ID.
func unlock(using credentialId: String, proximity: SeamUnlockProximity? = nil, timeout: TimeInterval = 10.0) throws -> AnyPublisher<SeamUnlockEvent, Never>
Parameters
ParameterDescription
credentialIdThe identifier of the credential to use for unlocking.
proximityThe required proximity for this unlock attempt. If nil, the SDK uses the credential’s default (the first value in supportedUnlockProximities).
timeoutThe maximum time, in seconds, to wait for the unlock operation. Defaults to 10.

Type Properties

shared

The shared singleton instance of Seam.
static let shared: Seam

Type Methods

initialize(clientSessionToken:)

Sets up the SDK using the provided client session token.
static func initialize(clientSessionToken: String) throws
Parameters
ParameterDescription
clientSessionTokenOptional - A valid client session token string.