<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/HMCharacteristic/updateAuthorizationData(_:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HMCharacteristic(im)updateAuthorizationData:completionHandler:"
  },
  "title" : "updateAuthorizationData(_:completionHandler:)"
}
-->

# updateAuthorizationData(_:completionHandler:)

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

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

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)