Tells the delegate to add an accessory to a home by using a setup payload.
- iOS 13.0+
The home manager making the request.
A description of the accessory to add.
HomeKit calls this method when it needs help adding an accessory to a home, which typically occurs when the accessory requires explicit user authentication that HomeKit can’t negotiate. HomeKit asks the accessory manufacturer’s app, which it locates using information provided by the accessory, to complete the authentication.
If you manufacture an accessory like this, handle the
home call in your app by creating an
HMAccessory instance in a way that’s appropriate for your accessory, outside of HomeKit:
Use the resulting token to create an
HMAccessory instance. If the request’s
requires flag is
true, get the payload URL corresponding to the named accessory, and include that in the setup payload as well:
Complete the setup by calling the home’s
add method with the payload: