<!--
{
  "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/init(url:)-7ytm5",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HMAccessorySetupPayload(im)initWithURL:"
  },
  "title" : "init(url:)"
}
-->

# init(url:)

Creates an accessory setup payload.

```
init?(url setupPayloadURL: URL?)
```

## Parameters

`setupPayloadURL`

The payload used to securely authenticate the accessory. This is the same payload you would receive by scanning the accessory’s QR code.

## Discussion

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

---

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)