Instance Method


Finds and adds nearby accessories to the home using a HomeKit code provided by your app.


- (void)addAndSetupAccessoriesWithPayload:(HMAccessorySetupPayload *)payload completionHandler:(void (^)(NSArray<HMAccessory *> *accessories, NSError *error))completion;


Use this method to add accessories that have already been deployed (for example, accessories that have HomeKit support added as a firmware update), or accessories for which scanning a QR code would be difficult. Your app provides the accessory’s HomeKit code using a setup payload. For details on the payload’s content, please join the MFi Program.

During this process, the user assigns the accessory to a room and configures its services.


Defining the Setup Payload


A payload for authenticating a HomeKit accessory.

See Also

Managing Accessories


The collection of accessories that are part of the home.

- addAndSetupAccessoriesWithCompletionHandler:

Finds and adds nearby accessories to the home.

- addAccessory:completionHandler:

Adds a new accessory to the home.

- assignAccessory:toRoom:completionHandler:

Assigns an accessory to a different room.

- removeAccessory:completionHandler:

Removes an accessory from the home.

- unblockAccessory:completionHandler:

Unblocks a blocked accessory.


A home automation accessory, like a garage door opener or a thermostat.