Enumeration

CBAttributePermissions

Values that represent the read, write, and encryption permissions for a characteristic’s value.

Declaration

typedef enum CBAttributePermissions : NSUInteger {
    ...
} CBAttributePermissions;

Overview

When you initialize a new mutable characteristic, you set the read, write, and encryption permissions for the characteristic’s value. Setting the read and write permissions for a characteristic’s value is different from specifying the read and write properties for a characteristic’s value. When you specify the read and write properties, the client (a central) inspects the read and write permissions of the characteristic’s value. When you specify the read and write permissions for a characteristic’s value, you set the permissions for the server (the peripheral) to allow the type of read or write specified by the characteristic’s properties. Therefore, when you initialize a mutable characteristic, you need to specify read or write properties and their corresponding permissions.

If you want to enforce encryption requirements for reads and writes on a characteristic’s value, you must specify the relevant permission (CBAttributePermissionsReadEncryptionRequired or CBAttributePermissionsWriteEncryptionRequired). You may set more than one permission for a characteristic’s value.

Topics

Permissions

CBAttributePermissionsReadable

A permission that indicates a peripheral can read the attribute’s value.

CBAttributePermissionsWriteable

A permission that indicates a peripheral can write the attribute’s value.

CBAttributePermissionsReadEncryptionRequired

A permission that indicates only trusted devices can read the attribute’s value.

CBAttributePermissionsWriteEncryptionRequired

A permission that indicates only trusted devices can write the attribute’s value.

See Also

Peripherals

CBPeripheral

A remote peripheral device.

CBPeripheralDelegate

A protocol that provides updates on the use of a peripheral’s services.

CBPeripheralManager

An object that manages and advertises peripheral services exposed by this app.

CBPeripheralManagerDelegate

A protocol that provides updates for local peripheral state and interactions with remote central devices.

CBAttribute

A representation of common aspects of services offered by a peripheral.