Class

HMHomeManager

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

Declaration

@interface HMHomeManager : NSObject

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.

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.

Diagram showing a collection of homes within the home manager, each of which has a collection of accessories.

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

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

HMHomeManagerAuthorizationStatus

The possible home-access states.

Working with the Home Layout

homes

An array of all homes managed by this home manager.

HMHome

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

Keeping Track of Connected Homes

delegate

A delegate that receives updates on the collection of homes.

HMHomeManagerDelegate

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

Adding and Removing Homes

- addHomeWithName:completionHandler:

Adds a new home to this home manager.

- removeHome:completionHandler:

Removes a home from this home manager.

Managing the Primary Home

primaryHome

The primary home managed by this home manager.

- updatePrimaryHome:completionHandler:

Updates the primary home of this home manager.

Relationships

Inherits From

See Also

The Home Manager

Configuring a Home Automation Device

Give users a familiar experience when they manage HomeKit accessories.

Testing Your App with the HomeKit Accessory Simulator

Install the HomeKit Accessory Simulator to help you debug your HomeKit-enabled app.