LockError

public enum LockError : Error, Equatable

This enum describes errors returned by Unlock, Lock and End Rental operations.

  • This error denotes a problem with LockKit SDK intialization.

    It’s described in more detail by its associated value.

    Declaration

    Swift

    case failedToInitializeSDK(InitializeSDKError)
  • The lock with this name was not registered using LockKit.initializeLock(...).

    Declaration

    Swift

    case lockNotRecognized
  • Ongoing lock action

    There is a different lock action (locking/unlocking) already in progress for this lock. Make sure it ends before you schedule another one.

    Declaration

    Swift

    case ongoingLockAction
  • The user’s device Bluetooth is turned off.

    Declaration

    Swift

    case bluetoothOff
  • The user has not authorized the app to use Bluetooth.

    Declaration

    Swift

    case bluetoothUnauthorized
  • The framework timed out while searching for a lock BLE peripheral.

    Declaration

    Swift

    case searchTimeout
  • The framework timed out while connecting to (a previously found) lock BLE peripheral.

    Declaration

    Swift

    case connectionTimeout
  • Timed out when waiting for the lock beam to be closed.

    Declaration

    Swift

    case lockTimeout
  • Timed out when waiting for the lock beam to open.

    Declaration

    Swift

    case unlockTimeout
  • Lock unlocked during a post connection lock check

    Due to a bug in certain AXA locks, they can unlock unprompted shortly after the connection to the lock is established (up to 15s). DonkeyLockKit attempts to mitigate the effects of this issue by waiting an extra period of time after the connection to the lock is established. This error corresponds to the lock unlocking “on its own” during this extra period of time.

    Declaration

    Swift

    case postConnectionLockCheckFailed
  • Lock unlocked during the extra lock check period in end rental.

    Due to a bug in certain AXA locks, they can unlock unprompted shortly after the connection to the lock is established (up to 15s). DonkeyLockKit attempts to mitigate the effects of this issue in an end-rental scenario by waiting an extra period of time after the lock was locked but before successfully completing the end rental attempt. This error corresponds to the lock unlocking during this extra period of time.

    Declaration

    Swift

    case extraLockCheckFailed
  • The e-key provided for the lock is invalid.

    Declaration

    Swift

    case invalidEkey
  • All lock commands (passkey contents) have already been used.

    You should obtain a new combination of e-key and passkey for this lock and call initializeLock(lockName:eKey:passkey:) to use this lock again.

    Declaration

    Swift

    case outOfCommands
  • Failed to complete the lock action within 80 seconds.

    This error means that something went unexpectedly wrong and DonkeyLockKit didn’t manage to handle the problem. DonkeyLockKit attempted to get out of this unexpected state by closing a connection from the lock (if there was any). You can now retry calling unlock(...), lock(...)or prepareEndRental(...)

    Declaration

    Swift

    case fullTimeout
  • Internet connection appears to be offline during an initial unlock attempt

    For security reasons the internet connection is required to unlock the bike for the first time.

    Declaration

    Swift

    case offlineDuringPickup
  • An umbrella error of all other errors. See message for details

    Declaration

    Swift

    case unknown(message: String)