Skip to main content

BleError

Enum: BleError

Ble error types

Conforms to: Error, CustomNSError

Properties

errorDomain: String

public static var errorDomain: String { get }

The error domain for BLE errors

actionCode: Int

public var actionCode: Int { get }

The action code only use for CtgError, for other error will return -1

errorCode: Int

public var errorCode: Int { get }

Error code

localizedDescription: String

public var localizedDescription: String { get }

Error description

Error Cases

bluetoohUnauthorized

case bluetoohUnauthorized
  • Error Code: 1
  • Description: Phone: Bluetooth permission is not granted, please go to settings to grant permission

bluetoothDisabled

case bluetoothDisabled
  • Error Code: 2
  • Description: Phone: Bluetooth is disabled, please go to settings to enable it

bluetoohUnsupported

case bluetoohUnsupported
  • Error Code: 3
  • Description: Phone: Device does not support Bluetooh Low Energy

saveAuthKeyFailed

case saveAuthKeyFailed
  • Error Code: 4
  • Description: Keychain: Failed to save the key in keychain

keyNotFound

case keyNotFound
  • Error Code: 5
  • Description: Keychain: Authentication key not found

keyInvalid

case keyInvalid
  • Error Code: 6
  • Description: BLE: Authentication key is invalid

terminalNotFound

case terminalNotFound
  • Error Code: 7
  • Description: BLE Scan: Terminal not found

notConnected

case notConnected
  • Error Code: 8
  • Description: Not connected to Ble Terminal

ctgError(Int, Int, String)

case ctgError(Int, Int, String)

Failed due to Terminal action, refer to CtgError

  • Parameters:
    • Action code (Int)
    • Error code (Int)
    • Description (String)

See Also