Instance Method

peripheral(_:didUpdateNotificationStateFor:error:)

Invoked when the peripheral receives a request to start or stop providing notifications for a specified characteristic’s value.

Declaration

optional func peripheral(_ peripheral: CBPeripheral, didUpdateNotificationStateFor characteristic: CBCharacteristic, error: Error?)

Parameters

peripheral

The peripheral providing this information.

characteristic

The characteristic for which notifications of its value are to be configured.

error

If an error occurred, the cause of the failure.

Discussion

This method is invoked when your app calls the setNotifyValue(_:for:) method. If successful, the error parameter is nil. If unsuccessful, the error parameter returns the cause of the failure.