Contents

updateAuthorizationData(_:completionHandler:)

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

Declaration

func updateAuthorizationData(_ data: Data?, completionHandler completion: @escaping  @Sendable ((any Error)?) -> Void)
func updateAuthorizationData(_ data: Data?) async throws

Parameters

  • data:

    New authorization data to use. Pass nil to remove authorization data.

  • 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