Enumerations
The following enumerations are available globally.
-
Credential-specific errors returned by the Seam SDK when a credential can’t be used.
if credential.errors.contains(.expired) { showExpiredAlert() }
Note
The order of errors in theerrors
array reflects priority; handle earlier errors first.Declaration
Swift
public enum SeamCredentialError : Error, Equatable, Hashable
-
Errors thrown by
Seam
for initialization, usage, and credential-precondition failures.
See moredo { try Seam.initialize(clientSessionToken: token) } catch let error as SeamError { switch error { case .invalidClientSessionToken: // Handle invalid token default: // Handle other errors } }
Declaration
Swift
public enum SeamError : Error
-
Represents the stages of a door unlock operation performed by the Seam SDK.
Use the sequence of events to update your UI in response to connection status, success, timeouts, and errors.
Example (Async/Await):
do { let credentialId = "some_credential_id" let stream = try Seam.shared.unlock(using: credentialId).values for await event in stream { // Handle each unlock event } } catch { // Handle error }
See Also:
See moreSeam.unlock(using:timeout:)
Declaration
Swift
public enum SeamUnlockEvent