Instance Method

peripheral(_:didWriteValueFor:error:)

Invoked when you write data to a characteristic descriptor’s value.

Declaration

optional func peripheral(_ peripheral: CBPeripheral, didWriteValueFor descriptor: CBDescriptor, error: Error?)

Parameters

peripheral

The peripheral providing this information.

descriptor

The characteristic descriptor whose value has been written.

error

If an error occurred, the cause of the failure.

Discussion

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

See Also

Writing Characteristic and Characteristic Descriptor Values

func peripheral(CBPeripheral, didWriteValueFor: CBCharacteristic, error: Error?)

Invoked when you write data to a characteristic’s value.