<!--
{
  "availability" : [
    "iOS: 11.3.0 -",
    "iPadOS: 11.3.0 -",
    "macCatalyst: 27.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/HMAccessorySetupPayload",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HMAccessorySetupPayload"
  },
  "title" : "HMAccessorySetupPayload"
}
-->

# HMAccessorySetupPayload

A payload for authenticating a HomeKit accessory.

```
class HMAccessorySetupPayload
```

## Overview

The setup payload provides a URL to authenticate an accessory. Typically, the URL comes from scanning a QR code on the accessory. Use a setup payload to authenticate devices that are already deployed, for which scanning a QR code would be difficult, or if you need to provide an optional ownership token that you negotiate with the accessory outside of HomeKit.

For details about the payload’s content, please join the [MFi Program](https://developer.apple.com/programs/mfi/).

## Topics

### Creating a Payload

[`-  initWithURL:`](/documentation/HomeKit/HMAccessorySetupPayload/init(url:)-7ytm5)

Creates an accessory setup payload.

[`-  initWithURL:ownershipToken:`](/documentation/HomeKit/HMAccessorySetupPayload/init(url:ownershipToken:)-32mrj)

Creates an accessory setup payload instance that includes an ownership token.

[`HMAccessoryOwnershipToken`](/documentation/HomeKit/HMAccessoryOwnershipToken)

Authentication data that your app provides when adding an accessory to a home.

## Relationships

### Conforms To

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)