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 the errors array reflects priority; handle earlier errors first.
    See more

    Declaration

    Swift

    public enum SeamCredentialError : Error, Equatable, Hashable
  • Errors thrown by Seam for initialization, usage, and credential-precondition failures.

      do {
          try Seam.initialize(clientSessionToken: token)
      } catch let error as SeamError {
          switch error {
          case .invalidClientSessionToken:
              // Handle invalid token
          default:
              // Handle other errors
          }
      }
    
    See more

    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: Seam.unlock(using:timeout:)

    See more

    Declaration

    Swift

    public enum SeamUnlockEvent