<!--
{
  "availability" : [
    "iOS: 8.0.0 - 16.1.0",
    "iPadOS: 8.0.0 - 16.1.0",
    "macCatalyst: 13.1.0 - 16.1.0",
    "tvOS: 10.0.0 - 16.1.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 2.0.0 - 9.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/HMHomeManager/updatePrimaryHome(_:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HMHomeManager(im)updatePrimaryHome:completionHandler:"
  },
  "title" : "updatePrimaryHome(_:completionHandler:)"
}
-->

# updatePrimaryHome(_:completionHandler:)

Updates the primary home of this home manager.

```
func updatePrimaryHome(_ home: HMHome, completionHandler completion: @escaping @Sendable ((any Error)?) -> Void)
```

## Parameters

`home`

The new primary home. Must be a home managed by this home manager.

`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)