An error encountered while using Core Bluetooth.


struct CBError


Inspecting Error Properties

var errorCode: Int

The code that identifies the error.

var errorUserInfo: [String : Any]

A dictionary that provides details about the error.

var localizedDescription: String

A string that contains the localized description of the error.

Error Codes

static var unknown: CBError.Code

An unknown error occurred.

static var invalidParameters: CBError.Code

The specified parameters are invalid.

static var invalidHandle: CBError.Code

The specified attribute handle is invalid.

static var notConnected: CBError.Code

The device isn’t currently connected.

static var outOfSpace: CBError.Code

The device has run out of space to complete the intended operation.

static var operationCancelled: CBError.Code

The error represents a canceled operation.

static var uuidNotAllowed: CBError.Code

The specified UUID isn’t permitted.

static var alreadyAdvertising: CBError.Code

The peripheral is already advertising.

static var connectionLimitReached: CBError.Code

The device already has the maximum number of connections.

static var operationNotSupported: CBError.Code

The operation isn’t supported.

static var unkownDevice: CBError.Code

A misspelled version of the unknown device error code.


Testing Error Inequality

static func != (CBError, CBError) -> Bool

Returns a Boolean value that indicates whether two values are unequal.

See Also


let CBErrorDomain: String

The domain for Core Bluetooth errors.

enum CBError.Code

The possible errors returned during Bluetooth low energy transactions.

struct CBATTError

An error encountered while using Attribute Protocol (ATT).

let CBATTErrorDomain: String

The domain for Core Bluetooth ATT errors.

enum CBATTError.Code

The possible errors returned by a GATT server (a remote peripheral) during Bluetooth low energy ATT transactions.