Package apple.usernotifications.protocol
Interface UNUserNotificationCenterDelegate
-
public interface UNUserNotificationCenterDelegateAPI-Since: 10.0
-
-
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(@NotNull UNUserNotificationCenter center, @NotNull UNNotificationResponse response, @NotNull 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(@NotNull UNUserNotificationCenter center, @Nullable 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(@NotNull UNUserNotificationCenter center, @NotNull UNNotification notification, @NotNull 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(@NotNull @NotNull UNUserNotificationCenter center, @NotNull @NotNull UNNotificationResponse response, @NotNull @NotNull 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:. API-Since: 10.0
-
userNotificationCenterWillPresentNotificationWithCompletionHandler
default void userNotificationCenterWillPresentNotificationWithCompletionHandler(@NotNull @NotNull UNUserNotificationCenter center, @NotNull @NotNull UNNotification notification, @NotNull @NotNull 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. API-Since: 10.0
-
userNotificationCenterOpenSettingsForNotification
default void userNotificationCenterOpenSettingsForNotification(@NotNull @NotNull UNUserNotificationCenter center, @Nullable @Nullable 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. API-Since: 12.0
-
-