<!--
{
  "availability" : [
    "iOS: 15.4.0 -",
    "iPadOS: 15.4.0 -",
    "macCatalyst: 15.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/HMAccessorySetupManager/performAccessorySetup(using:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HMAccessorySetupManager(im)performAccessorySetupUsingRequest:completionHandler:"
  },
  "title" : "performAccessorySetup(using:completionHandler:)"
}
-->

# performAccessorySetup(using:completionHandler:)

Performs the process of setting up accessories with Apple Home.

```
func performAccessorySetup(using request: HMAccessorySetupRequest, completionHandler completion: @escaping @Sendable (HMAccessorySetupResult?, (any Error)?) -> Void)
```

## Parameters

`request`

The accessory setup request.

`completion`

A block that the framework invokes once the setup process completes.

## Discussion

During the setup process, the framework adds each accessory to a home, assigns it to a room, and provides further configuration based on its services.

---

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)