---
title: HMHomeManager
framework: homekit
role: symbol
role_heading: Class
path: homekit/hmhomemanager
---

# HMHomeManager

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

## Declaration

```swift
class HMHomeManager
```

## Mentioned in

Enabling HomeKit in your app

## Overview

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.

Each app creates a single HMHomeManager instance to coordinate its HomeKit-related activities. The manager’s homes array gives your app access to a collection of 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.

Adopt the 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](homekit/hmhomemanager/authorizationstatus.md)
- [HMHomeManagerAuthorizationStatus](homekit/hmhomemanagerauthorizationstatus.md)

### Working with the home layout

- [homes](homekit/hmhomemanager/homes.md)
- [HMHome](homekit/hmhome.md)

### Keeping track of connected homes

- [delegate](homekit/hmhomemanager/delegate.md)
- [HMHomeManagerDelegate](homekit/hmhomemanagerdelegate.md)

### Adding and removing homes

- [addHome(withName:completionHandler:)](homekit/hmhomemanager/addhome(withname:completionhandler:).md)
- [removeHome(_:completionHandler:)](homekit/hmhomemanager/removehome(_:completionhandler:).md)

### Managing the primary home

- [primaryHome](homekit/hmhomemanager/primaryhome.md)
- [updatePrimaryHome(_:completionHandler:)](homekit/hmhomemanager/updateprimaryhome(_:completionhandler:).md)

### Initializers

- [init()](homekit/hmhomemanager/init().md)

### Instance Methods

- [findVendorAccessory(hapPublicKey:completionHandler:)](homekit/hmhomemanager/findvendoraccessory(happublickey:completionhandler:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Home Manager

- [Configuring a home automation device](homekit/configuring-a-home-automation-device.md)
- [Testing your app with the HomeKit Accessory Simulator](homekit/testing-your-app-with-the-homekit-accessory-simulator.md)
