PSHNotificationDelegate Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | PSHNotificationDelegate.h |
– shouldPerformDefaultActionForRemoteNotification:completionHandler:
required method
This method is called when a notification is received in foreground of background. It is also called to give authorization to the SDK to perform default actions when a notification that triggers an action is received but the action is not performed,i.e.: A notification that should open a landing page is received but the app is in the background, this method will be called in background and again in foreground when the landing page should be actually shown.
- (BOOL)shouldPerformDefaultActionForRemoteNotification:(PSHNotification *)notification completionHandler:(void ( ^ ) ( UIBackgroundFetchResult ))completionHandler
Parameters
notification |
Received notification. |
---|---|
completionHandler |
Execute this callback when you are finished performing the background operations. It’s important to execute this callback once you have finished all your operations, since this tells the system to terminate your application. If you don’t execute the callback, the system will assume your application is not working and the system could decide that no more notifications will be delivered to your app. |
Return Value
Wether the SDK can execute the default actions for this notification of not.
Declared In
PSHNotificationDelegate.h
– performInteraction:onNotification:
This method is called when a notification interaction is received.
- (void)performInteraction:(NSString *)actionID onNotification:(PSHNotification *)notification
Parameters
actionID |
Action identifier. |
---|---|
notification |
Notification the action belongs to. |
Declared In
PSHNotificationDelegate.h