Interim hand-authored reference. This page is authored from the SeamSDK public Swift sources. See the reference overview for context.
Overview
SeamSDKService is a public final class that subclasses NSObject and carries the Objective-C name SeamSDKService. It wraps the Seam singleton with @objc-annotated properties and methods so that cross-platform frameworks (React Native, Flutter, Cordova) can call them from JavaScript or Dart without requiring Swift-native async/await or Combine.
Seam directly. SeamSDKService is intended for bridge scenarios where Objective-C runtime interop is required.
Shared Instance
shared
The shared singleton instance.
Type Methods
initialize(clientSessionToken:)
Initializes the Seam SDK with the provided token. Returns 0 on success and 1 on failure (ObjC-friendly error signaling).
| Parameter | Type | Description |
|---|---|---|
clientSessionToken | NSString | A valid client session token. |
NSNumber(0) on success, NSNumber(1) if initialization throws.
Instance Properties
isActive
Boxed Boolean indicating whether the Seam SDK is currently active.
Seam.shared.isActive as an NSNumber for Objective-C callers.
credentials
The current credentials as an NSArray of NSDictionary objects.
| Key | Type | Description |
|---|---|---|
id | String | Credential identifier. |
name | String | Display name. |
location | String | Associated location. |
provider | String? | Third-party provider name, if any. |
expiryEpoch | TimeInterval? | Expiry as Unix timestamp, if set. |
cardNumber | String? | Card number, if any. |
code | String? | Access code, if any. |
errors | [NSDictionary] | Encoded credential errors (see SeamCredentialError). |
Instance Methods
isActivePublisher()
Returns a Combine publisher for the isActive state as an AnyObject.
AnyPublisher<Bool, Never> erased to AnyObject for ObjC bridging.
credentialsPublisher()
Returns a Combine publisher for the credentials array as an AnyObject.
AnyPublisher<[NSDictionary], Never> erased to AnyObject.
activate(_:)
Activates the SDK asynchronously, calling the completion handler when done.
| Parameter | Type | Description |
|---|---|---|
completion | (NSNumber, NSString?) -> Void | Called with (0, nil) on success or (1, nil) on failure. |
refresh(_:)
Refreshes credentials asynchronously and calls the completion handler with the result.
| Parameter | Type | Description |
|---|---|---|
completion | (NSNumber, NSArray?) -> Void | Called with (0, credentials) on success or (1, nil) on failure. |
unlock(credentialId:timeout:)
Unlocks a door using the given credential ID and returns an event publisher.
| Parameter | Type | Description |
|---|---|---|
credentialId | NSString | The credential ID to unlock with. |
timeout | NSNumber | Maximum seconds to wait. |
AnyPublisher<NSDictionary, Never> erased to AnyObject. Each dictionary represents a SeamUnlockEvent with an "event" key ("launched", "grantedAccess", "timedOut", "connectionFailed") and, for "connectionFailed", an optional "debug" key.
If the unlock call throws (for example, invalid credential ID), an immediately-completing empty publisher is returned.
