Interface UNUserNotificationCenterDelegate


  • public interface UNUserNotificationCenterDelegate
    • Method Detail

      • userNotificationCenterWillPresentNotificationWithCompletionHandler

        default void userNotificationCenterWillPresentNotificationWithCompletionHandler​(UNUserNotificationCenter center,
                                                                                        UNNotification notification,
                                                                                        UNUserNotificationCenterDelegate.Block_userNotificationCenterWillPresentNotificationWithCompletionHandler completionHandler)
        The method will be called on the delegate only if the application is in the foreground. If the method is not implemented or the handler is not called in a timely manner then the notification will not be presented. The application can choose to have the notification presented as a sound, badge, alert and/or in the notification list. This decision should be based on whether the information in the notification is otherwise visible to the user.
      • userNotificationCenterOpenSettingsForNotification

        default void userNotificationCenterOpenSettingsForNotification​(UNUserNotificationCenter center,
                                                                       UNNotification notification)
        The method will be called on the delegate when the application is launched in response to the user's request to view in-app notification settings. Add UNAuthorizationOptionProvidesAppNotificationSettings as an option in requestAuthorizationWithOptions:completionHandler: to add a button to inline notification settings view and the notification settings view in Settings. The notification will be nil when opened from Settings.