BatchActions

@interface BatchActions

Batch’s Actions module

  • Register an action with Batch. If an action already exists for that identifier, it will be replaced. Identifiers are not case-sensitive. Note that the action identifier cannot start with “batch.”, as they are reserved by the SDK. Trying to register such an action will throw an error.

    @returns An NSError pointer if the action couldn’t be registered, nil otherwise

    Declaration

    Objective-C

    + (id)registerAction:(nonnull BatchUserAction *)action;

    Parameters

    action

    The action to register

  • Unregister an action from Batch.

    Trying to unregister an action that has not be registered will silently fail. Note that trying to unregister an action that starts with “batch.” will fail silently.

    Declaration

    Objective-C

    + (void)unregisterActionIdentifier:(id)actionIdentifier;

    Parameters

    actionIdentifier

    The action’s identifier. Not case-sensitive

  • Perform an action registered with Batch. The action source will be BatchManualUserActionSource.

    Note that manually trying to trigger builtin actions (prefixed by “batch.”) will not work.

    @returns YES if the action was performed, NO if no action was found or another error occurred

    Declaration

    Objective-C

    + (id)performActionIdentifiedBy:(id)identifier withArguments:(id)args;

    Parameters

    identifier

    The action identifier. Case-unsensitive. Cannot be nil.

    args

    A dictionary containing the action arguments. Cannot be nil.