Skip to content

Dealing with user tapping on notification

iOS

When you don't specify a callback for handling notifications, Plot will handle the notifications in the following manner: When a notification is opened, it will treat the data field of the notification as URI and tries to open it.

If you don’t want Plot to handle the notifications, you can handle the notifications yourself. The delegate passed to [Plot initializeWithDelegate:] determines what is done after a notification is opened. The delegate has to implement the PlotDelegate protocol. When the method -(void)plotHandleNotification:(NSString*)data response:(UNNotificationResponse*)response is implemented, the default handler is replaced by this method which will then be called when a notification is opened.

Note

There is another method available which is: -(void)plotHandleNotification:(UNNotificationRequest*)notification data:(NSString*)action Which behaves the same as the previous one. You can use it in case you don't need access to UNNotificationResponse object.