UARegistrationDelegate
@objc
public protocol UARegistrationDelegate
Implement this protocol and add as a Push.registrationDelegate to receive registration success and failure callbacks.
-
Called when APNS registration completes.
Declaration
Swift
@objc func notificationRegistrationFinished( withAuthorizedSettings authorizedSettings: UAAuthorizedNotificationSettings, categories: Set<UNNotificationCategory>, status: UNAuthorizationStatus )
Parameters
authorizedSettings
The settings that were authorized at the time of registration.
categories
Set of the categories that were most recently registered.
status
The authorization status.
-
Called when APNS registration completes.
Declaration
Swift
@objc func notificationRegistrationFinished( withAuthorizedSettings authorizedSettings: UAAuthorizedNotificationSettings, status: UNAuthorizationStatus )
Parameters
authorizedSettings
The settings that were authorized at the time of registration.
status
The authorization status.
-
Called when notification authentication changes with the new authorized settings.
Declaration
Swift
@objc func notificationAuthorizedSettingsDidChange( _ authorizedSettings: UAAuthorizedNotificationSettings )
Parameters
authorizedSettings
AirshipAuthorizedNotificationSettings The newly changed authorized settings.
-
Called when the UIApplicationDelegate’s application:didRegisterForRemoteNotificationsWithDeviceToken: delegate method is called.
Declaration
Swift
@objc func apnsRegistrationSucceeded( withDeviceToken deviceToken: Data )
Parameters
deviceToken
The APNS device token.
-
Called when the UIApplicationDelegate’s application:didFailToRegisterForRemoteNotificationsWithError: delegate method is called.
Declaration
Swift
@objc func apnsRegistrationFailedWithError(_ error: any Error)
Parameters
error
An NSError object that encapsulates information why registration did not succeed.