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
authorizedSettingsThe settings that were authorized at the time of registration.
categoriesSet of the categories that were most recently registered.
statusThe authorization status.
-
Called when APNS registration completes.
Declaration
Swift
@objc func notificationRegistrationFinished( withAuthorizedSettings authorizedSettings: UAAuthorizedNotificationSettings, status: UNAuthorizationStatus )Parameters
authorizedSettingsThe settings that were authorized at the time of registration.
statusThe authorization status.
-
Called when notification authentication changes with the new authorized settings.
Declaration
Swift
@objc func notificationAuthorizedSettingsDidChange( _ authorizedSettings: UAAuthorizedNotificationSettings )Parameters
authorizedSettingsAirshipAuthorizedNotificationSettings 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
deviceTokenThe APNS device token.
-
Called when the UIApplicationDelegate’s application:didFailToRegisterForRemoteNotificationsWithError: delegate method is called.
Declaration
Swift
@objc func apnsRegistrationFailedWithError(_ error: any Error)Parameters
errorAn NSError object that encapsulates information why registration did not succeed.
View on GitHub