Protocol

HMAccessoryDelegate

A set of methods that defines the communication method for state updates from accessories to their delegates.

Declaration

@protocol HMAccessoryDelegate

Overview

Adopt this protocol to find out about changes made outside your app to a specific accessory, like when the accessory’s name changes, or when a characteristic value changes.

Changes that your app initiates—even those made asynchronously followed by a call to a completion handler—generate delegate callbacks in other apps, but not in your own. As a result, your app must update its internal data store or user interface from both the completion handler of an asynchronous call, and the delegate callback that corresponds to the same kind of change made by another app.

To find out about changes made to the accessory’s home, adopt the HMHomeDelegate protocol. To be alerted about changes made to the overall list of homes, adopt the HMHomeManagerDelegate protocol.

Topics

Observing Accessories

- accessoryDidUpdateName:

Informs the delegate when the name of the accessory is updated.

- accessoryDidUpdateReachability:

Informs the delegate when the reachability of the accessory changes.

- accessoryDidUpdateServices:

Informs the delegate when the services on the accessory have been updated.

- accessory:didUpdateNameForService:

Informs the delegate when the name of a service is updated.

- accessory:service:didUpdateValueForCharacteristic:

Informs the delegate of a change in value of a characteristic.

- accessory:didUpdateAssociatedServiceTypeForService:

Informs the delegate when the associated service type of a service is modified.

- accessory:didAddProfile:

Informs the delegate when a profile is added to an accessory.

- accessory:didRemoveProfile:

Informs the delegate when a profile is removed from an accessory.

- accessory:didUpdateFirmwareVersion:

Informs the delegate when firmwareVersion has been changed for an accessory.

Relationships

Inherits From

See Also

Tracking Changes to an Accessory

delegate

A delegate that receives updates on the state of the accessory.