RegistrationDelegate
@objc(UARegistrationDelegate)
public protocol RegistrationDelegate : NSObjectProtocol
Implement this protocol and add as a Push.registrationDelegate to receive registration success and failure callbacks.
-
Called when APNS registration completes.
Declaration
Swift
@objc optional func notificationRegistrationFinished( withAuthorizedSettings authorizedSettings: UAAuthorizedNotificationSettings, categories: Set<UNNotificationCategory>, status: UAAuthorizationStatus )
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 optional func notificationRegistrationFinished( withAuthorizedSettings authorizedSettings: UAAuthorizedNotificationSettings, status: UAAuthorizationStatus )
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 optional func notificationAuthorizedSettingsDidChange( _ authorizedSettings: UAAuthorizedNotificationSettings )
Parameters
authorizedSettings
UAAuthorizedNotificationSettings The newly changed authorized settings.
-
Called when the UIApplicationDelegate’s application:didRegisterForRemoteNotificationsWithDeviceToken: delegate method is called.
Declaration
Swift
@objc optional 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 optional func apnsRegistrationFailedWithError(_ error: Error)
Parameters
error
An NSError object that encapsulates information why registration did not succeed.