Protocol

CBPeripheralDelegate

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

Declaration

@protocol CBPeripheralDelegate

Overview

The delegate of a CBPeripheral object must adopt the CBPeripheralDelegate protocol. The delegate uses this protocol’s methods to monitor the discovery, exploration, and interaction of a remote peripheral’s services and properties. This protocol doesn’t have any required methods.

Topics

Discovering Services

- peripheral:didDiscoverServices:

Tells the delegate that peripheral service discovery succeeded.

- peripheral:didDiscoverIncludedServicesForService:error:

Tells the delegate that discovering included services within the indicated service completed.

Discovering Characteristics and their Descriptors

- peripheral:didDiscoverCharacteristicsForService:error:

Tells the delegate that the peripheral found characteristics for a service.

- peripheral:didDiscoverDescriptorsForCharacteristic:error:

Tells the delegate that the peripheral found descriptors for a characteristic.

Retrieving Characteristic and Descriptor Values

- peripheral:didUpdateValueForCharacteristic:error:

Tells the delegate that retrieving the specified characteristic’s value succeeded, or that the characteristic’s value changed.

- peripheral:didUpdateValueForDescriptor:error:

Tells the delegate that retrieving a specified characteristic descriptor’s value succeeded.

Writing Characteristic and Descriptor Values

- peripheral:didWriteValueForCharacteristic:error:

Tells the delegate that the peripheral successfully set a value for the characteristic.

- peripheral:didWriteValueForDescriptor:error:

Tells the delegate that the peripheral successfully set a value for the descriptor.

- peripheralIsReadyToSendWriteWithoutResponse:

Tells the delegate that a peripheral is again ready to send characteristic updates.

Managing Notifications for a Characteristic’s Value

- peripheral:didUpdateNotificationStateForCharacteristic:error:

Tells the delegate that the peripheral received a request to start or stop providing notifications for a specified characteristic’s value.

Retrieving a Peripheral’s RSSI Data

- peripheral:didReadRSSI:error:

Tells the delegate that retrieving the value of the peripheral’s current Received Signal Strength Indicator (RSSI) succeeded.

- peripheralDidUpdateRSSI:error:

Tells the delegate that retrieving the value of the peripheral’s current Received Signal Strength Indicator (RSSI) succeeded.

Deprecated

Monitoring Changes to a Peripheral’s Name or Services

- peripheralDidUpdateName:

Tells the delegate that a peripheral’s name changed.

- peripheral:didModifyServices:

Tells the delegate that a peripheral’s services changed.

- peripheralDidInvalidateServices:

Tells the delegate a peripheral’s services have changed.

Monitoring L2CAP Channels

- peripheral:didOpenL2CAPChannel:error:

Delivers the result of an attempt to open an L2CAP channel.

Relationships

Inherits From

See Also

Peripherals

CBPeripheral

A remote peripheral device.

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.

CBAttributePermissions

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