Instance Method

peripheralManager:central:didSubscribeToCharacteristic:

Invoked when a remote central device subscribes to a characteristic’s value.

Declaration

- (void)peripheralManager:(CBPeripheralManager *)peripheral central:(CBCentral *)central didSubscribeToCharacteristic:(CBCharacteristic *)characteristic;

Parameters

peripheral

The peripheral manager providing this information.

central

The remote central device that subscribed to the characteristic’s value.

characteristic

The characteristic whose value has been subscribed to.

Discussion

This method is invoked when a remote central device subscribes to the value of one of the local peripheral’s characteristics, by enabling notifications or indications on the characteristic’s value. You should use the invocation of this method as a cue to start sending the subscribed central updates as the characteristic’s value changes. To send updated characteristic values to subscribed centrals, use the updateValue:forCharacteristic:onSubscribedCentrals: method of the CBPeripheralManager class.

See Also

Monitoring Subscriptions to Characteristic Values

- peripheralManager:central:didUnsubscribeFromCharacteristic:

Invoked when a remote central device unsubscribes from a characteristic’s value.

- peripheralManagerIsReadyToUpdateSubscribers:

Invoked when a local peripheral device is again ready to send characteristic value updates.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software