INSPushDelegate Protocol Reference

Conforms to NSObject
Declared in INSPush.h

Overview

The INSPushDelegate protocol defines optional methods for push delegation to intercept action triggering before their execution.

– shouldExecuteAction:triggeredBy:triggerType:

Sent when an action is triggered. It is called just before the push manager executes the action according to its type and content.

- (BOOL)shouldExecuteAction:(INSPushAction *)action triggeredBy:(id)triggerSource triggerType:(INSTriggerType)triggerType

Parameters

action

The action that should be executed by the push manager.

triggerSource

The trigger source which has triggered the action (it could be an object of class INSBeacon, INSBeaconRegion or INSGeofenceArea according to the trigger type).

triggerType

The type of the trigger source.

Return Value

YES if the push manager could execute the action, otherwise NO.

Discussion

If the method is implemented, returning NO will disable any default action behavior. You are able to return NO for specific action (by checking the action.type, the trigger type or source). If you want to override a behavior, you must implement your code here and return NO.

If a notification is defined for an action, it will be presented as a UILocalNotification.

Here are default implemented behaviors :

  • INSActionTypeNotification: a UILocalNotification through UIApplication presentLocalNotificationNow: method.

When the executeActionFromLocalNotification: method is implemented, this callback will be called with nil source and INSTriggerTypeUnknown trigger type.

Declared In

INSPush.h