Instance Method

addAction:completionHandler:

Adds an action to the action set.

Declaration

- (void)addAction:(HMAction *)action completionHandler:(void (^)(NSError *error))completion;

Parameters

action

The action to add. Actions may only be in one set—create separate HMAction objects for the same conceptual action if you want an action to be in more than one action set.

completion

The block executed after the request is processed.

error

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

See Also

Defining the Associated Actions

actions

Set of actions in the action set.

- removeAction:completionHandler:

Removes an action from the action set.

HMCharacteristicWriteAction

An action in an action set that writes a value to a characteristic.

HMAction

An abstract base class for actions in HomeKit.