Structure

CBATTError

An error encountered while using Attribute Protocol (ATT).

Declaration

struct CBATTError

Topics

Inspecting Error Properties

static var errorDomain: String

The domain of Core Bluetooth errors.

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 success: CBATTError.Code

The ATT command or request successfully completed.

static var invalidHandle: CBATTError.Code

The attribute handle is invalid on this peripheral.

static var readNotPermitted: CBATTError.Code

The permissions prohibit reading the attribute’s value.

static var writeNotPermitted: CBATTError.Code

The permissions prohibit writing the attribute’s value.

static var invalidPdu: CBATTError.Code

The attribute Protocol Data Unit (PDU) is invalid.

static var insufficientAuthentication: CBATTError.Code

Reading or writing the attribute’s value failed for lack of authentication.

static var requestNotSupported: CBATTError.Code

The attribute server doesn’t support the request received from the client.

static var invalidOffset: CBATTError.Code

The specified offset value was past the end of the attribute’s value.

static var insufficientAuthorization: CBATTError.Code

Reading or writing the attribute’s value failed for lack of authorization.

static var prepareQueueFull: CBATTError.Code

The prepare queue is full, as a result of there being too many write requests in the queue.

static var attributeNotFound: CBATTError.Code

The attribute wasn’t found within the specified attribute handle range.

static var attributeNotLong: CBATTError.Code

The ATT read blob request can’t read or write the attribute.

static var insufficientEncryptionKeySize: CBATTError.Code

The encryption key size used for encrypting this link is insufficient.

static var invalidAttributeValueLength: CBATTError.Code

The length of the attribute’s value is invalid for the intended operation.

static var unlikelyError: CBATTError.Code

The ATT request encountered an unlikely error and wasn’t completed.

static var insufficientEncryption: CBATTError.Code

Reading or writing the attribute’s value failed for lack of encryption.

static var unsupportedGroupType: CBATTError.Code

The attribute type isn’t a supported grouping attribute as defined by a higher-layer specification.

static var insufficientResources: CBATTError.Code

Resources are insufficient to complete the ATT request.

Testing Error Inequality

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

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

See Also

Errors

struct CBError

An error encountered while using Core Bluetooth.

let CBErrorDomain: String

The domain for Core Bluetooth errors.

enum CBError.Code

The possible errors returned during Bluetooth low energy transactions.

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.