UAPushNotificationDelegate
@objc
public protocol UAPushNotificationDelegate : Sendable
Protocol to be implemented by push notification clients. All methods are optional.
-
Called when a notification is received in the foreground.
Declaration
Swift
@objc func receivedForegroundNotification( _ userInfo: [AnyHashable: Any], completionHandler: @escaping () -> Void )
Parameters
userInfo
The notification info
completionHandler
the completion handler to execute when notification processing is complete.
-
Called when a notification is received in the background.
Declaration
Swift
@objc func receivedBackgroundNotification( _ userInfo: [AnyHashable: Any], completionHandler: @escaping (UIBackgroundFetchResult) -> Void )
Parameters
userInfo
The notification info
completionHandler
the completion handler to execute when notification processing is complete.
-
Called when a notification is received in the background.
-
Called when a notification is received in the background or foreground and results in a user interaction. User interactions can include launching the application from the push, or using an interactive control on the notification interface such as a button or text field.
Declaration
Swift
@objc func receivedNotificationResponse( _ notificationResponse: UNNotificationResponse, completionHandler: @escaping () -> Void )
Parameters
notificationResponse
UNNotificationResponse object representing the user’s response to the notification and the associated notification contents.
completionHandler
the completion handler to execute when processing the user’s response has completed.
-
Called when a notification has arrived in the foreground and is available for display.
Declaration
Swift
@objc(extendPresentationOptions:notification:completionHandler:) func extendPresentationOptions( _ options: UNNotificationPresentationOptions, notification: UNNotification, completionHandler: @escaping (UNNotificationPresentationOptions) -> Void )
Parameters
options
The notification presentation options.
notification
The notification.
completionHandler
The completion handler.