Contents

HMAddAccessoryRequest

A request to add an accessory to a particular home.

Declaration

class HMAddAccessoryRequest

Overview

An HMAddAccessoryRequest instance describes an accessory that your app should add to a home. HomeKit calls your home manager delegate’s homeManager(_:didReceiveAddAccessoryRequest:) method with a request.

Use the request’s accessoryName and accessoryCategory properties to obtain a token by negotiating with the accessory outside of HomeKit. If the requiresSetupPayloadURL property is true, also prepare a setup payload URL. Then create a setup payload with either the makePayload(url:ownershipToken:) or makePayload(ownershipToken:) method. Complete the request by calling the addAndSetupAccessories(with:completionHandler:) method on the request’s home property.

Topics

Characterizing the Request

Creating a Payload

Initializers

See Also

Adding accessories