Package apple.usernotifications.protocol
Interface UNUserNotificationCenterDelegate
-
public interface UNUserNotificationCenterDelegate
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceUNUserNotificationCenterDelegate.Block_userNotificationCenterDidReceiveNotificationResponseWithCompletionHandlerstatic interfaceUNUserNotificationCenterDelegate.Block_userNotificationCenterWillPresentNotificationWithCompletionHandler
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voiduserNotificationCenterDidReceiveNotificationResponseWithCompletionHandler(UNUserNotificationCenter center, UNNotificationResponse response, UNUserNotificationCenterDelegate.Block_userNotificationCenterDidReceiveNotificationResponseWithCompletionHandler completionHandler)The method will be called on the delegate when the user responded to the notification by opening the application, dismissing the notification or choosing a UNNotificationAction.default voiduserNotificationCenterOpenSettingsForNotification(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.default voiduserNotificationCenterWillPresentNotificationWithCompletionHandler(UNUserNotificationCenter center, UNNotification notification, UNUserNotificationCenterDelegate.Block_userNotificationCenterWillPresentNotificationWithCompletionHandler completionHandler)The method will be called on the delegate only if the application is in the foreground.
-
-
-
Method Detail
-
userNotificationCenterDidReceiveNotificationResponseWithCompletionHandler
default void userNotificationCenterDidReceiveNotificationResponseWithCompletionHandler(UNUserNotificationCenter center, UNNotificationResponse response, UNUserNotificationCenterDelegate.Block_userNotificationCenterDidReceiveNotificationResponseWithCompletionHandler completionHandler)
The method will be called on the delegate when the user responded to the notification by opening the application, dismissing the notification or choosing a UNNotificationAction. The delegate must be set before the application returns from application:didFinishLaunchingWithOptions:.
-
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.
-
-