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.

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