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

# HMHomeManager

The manager for a collection of one or more of a user’s homes.

```
class HMHomeManager
```

## Overview

HomeKit stores the user’s home automation information in a database that’s shared among Apple’s built-in iOS Home app, your HomeKit-enabled app, and apps from other developers. All these apps access the database as peers using the HomeKit framework.

![Diagram showing how different apps use HomeKit to access the shared HomeKit database.](images/com.apple.homekit/media-3111423@2x.png)

Each app creates a single [`HMHomeManager`](/documentation/HomeKit/HMHomeManager) instance to coordinate its HomeKit-related activities. The manager’s [`homes`](/documentation/HomeKit/HMHomeManager/homes) array gives your app access to a collection of [`HMHome`](/documentation/HomeKit/HMHome) instances that represent the user’s homes. These in turn contain references to the home automation accessories that your app can inspect and control.

![Diagram showing a collection of homes within the home manager, each of which has a collection of accessories.](images/com.apple.homekit/media-3111594@2x.png)

Adopt the [`HMHomeManagerDelegate`](/documentation/HomeKit/HMHomeManagerDelegate) protocol in your app to stay informed of any changes to the set of homes made outside your app.

## Topics

### Inspecting authorization status

[`authorizationStatus`](/documentation/HomeKit/HMHomeManager/authorizationStatus)

The current state of the app’s access to home data.

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

The possible home-access states.

### Working with the home layout

[`homes`](/documentation/HomeKit/HMHomeManager/homes)

An array of all homes managed by this home manager.

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

The primary unit of living space, typically composed of rooms organized into zones.

### Keeping track of connected homes

[`delegate`](/documentation/HomeKit/HMHomeManager/delegate)

A delegate that receives updates on the collection of homes.

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

An interface the home manager uses to communicate changes to the state of the home network.

### Adding and removing homes

[`-  addHomeWithName:completionHandler:`](/documentation/HomeKit/HMHomeManager/addHome(withName:completionHandler:))

Adds a new home to this home manager.

[`-  removeHome:completionHandler:`](/documentation/HomeKit/HMHomeManager/removeHome(_:completionHandler:))

Removes a home from this home manager.

### Managing the primary home

[`primaryHome`](/documentation/HomeKit/HMHomeManager/primaryHome)

The primary home managed by this home manager.

[`-  updatePrimaryHome:completionHandler:`](/documentation/HomeKit/HMHomeManager/updatePrimaryHome(_:completionHandler:))

Updates the primary home of this home manager.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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