Instance Method

peripheral(_:didUpdateValueFor:error:)

Invoked when you retrieve a specified characteristic descriptor’s value.

Declaration

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

Parameters

peripheral

The peripheral providing this information.

descriptor

The characteristic descriptor whose value has been retrieved.

error

If an error occurred, the cause of the failure.

Discussion

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

See Also

Retrieving Characteristic and Characteristic Descriptor Values

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

Invoked when you retrieve a specified characteristic’s value, or when the peripheral device notifies your app that the characteristic’s value has changed.