AMPUserNotificationCenterHandling protocol

A delegate for manual handling foreground push notifications on iOS 10 and higher.

Use this delegate if you implement the UNUserNotificationCenterDelegate protocol with custom logic. You should implement all methods of UNUserNotificationCenterDelegate and call its corresponding methods in AMPUserNotificationCenterHandling.

The implementation of this delegate is called by the userNotificationCenterHandler method of the AMPAppMetricaPush class.

Instance methods

-userNotificationCenterWillPresentNotification:

You should call this method in your implementation of userNotificationCenter:willPresentNotification:withCompletionHandler:.

-userNotificationCenterDidReceiveNotificationResponse:

You should call this method in your implementation of userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:.

-userNotificationCenterOpenSettingsForNotification:

You should call this method in your implementation of userNotificationCenter:openSettingsForNotification:.

Method descriptions

-userNotificationCenterWillPresentNotification:

- (void)userNotificationCenterWillPresentNotification:(UNNotification *)notification

You should call this method in your implementation of userNotificationCenter:willPresentNotification:withCompletionHandler:.

Parameters:

notification

The instance of UNNotification.

-userNotificationCenterDidReceiveNotificationResponse:

- (void)userNotificationCenterDidReceiveNotificationResponse:(UNNotificationResponse *)response;

You should call this method in your implementation of userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:.

Parameters:

notification

The instance of UNNotificationResponse.

-userNotificationCenterOpenSettingsForNotification:

- (void)userNotificationCenterOpenSettingsForNotification:(nullable UNNotification *)notification API_AVAILABLE(ios(12.0));

You should call this method in your implementation of userNotificationCenter:openSettingsForNotification:.

Parameters:

notification

The instance of UNNotification.