Instance Method

writeValue(_:completionHandler:)

Modifies the value of the characteristic.

Declaration

func writeValue(_ value: Any?, completionHandler completion: @escaping (Error?) -> Void)

Parameters

value

The new value.

completion

The block executed after the request is processed.

error

nil on success; otherwise, error object indicating the reason for failure.

See Also

Controlling a Characteristic

var value: Any?

The current value of the characteristic.

func readValue(completionHandler: (Error?) -> Void)

Reads the value for the characteristic.

func updateAuthorizationData(Data?, completionHandler: (Error?) -> Void)

Sets or clears authorization data used when writing to the characteristic.