Instance Method

enableNotification:completionHandler:

Enables or disables notifications for changes in the value of the characteristic.

Declaration

- (void)enableNotification:(BOOL)enable completionHandler:(void (^)(NSError *error))completion;

Parameters

enable

YES to enable notifications, NO to disable notifications.

completion

The block executed after the request is processed.

error

nil on success; otherwise, error object indicating the reason for failure.

Discussion

HomeKit delivers notifications to the accessory delegate using the accessory:service:didUpdateValueForCharacteristic: method.

See Also

Receiving Change Notifications

notificationEnabled

A Boolean indicating whether the characteristic has been set to send notifications.