UARegistrationDelegate

@protocol UARegistrationDelegate <NSObject>

Implement this protocol and add as a [UAPush registrationDelegate] to receive registration success and failure callbacks.

  • Called when the device channel registers with Urban Airship. Successful registrations could be disabling push, enabling push, or updating the device registration settings.

    The device token will only be available once the application successfully registers with APNS.

    When registration finishes in the background, any async tasks that are triggered from this call should request a background task. - parameter: channelID The channel ID string. - parameter: deviceToken The device token string.

    Declaration

    Objective-C

    - (void)registrationSucceededForChannelID:(nonnull NSString *)channelID
                                  deviceToken:(nonnull NSString *)deviceToken;

    Swift

    optional func registrationSucceeded(forChannelID channelID: String, deviceToken: String)

    Parameters

    channelID

    The channel ID string.

    deviceToken

    The device token string.

  • Called when the device channel failed to register with Urban Airship.

    When registration finishes in the background, any async tasks that are triggered from this call should request a background task.

    Declaration

    Objective-C

    - (void)registrationFailed;

    Swift

    optional func registrationFailed()
  • Called when APNS registration completes.

    Declaration

    Objective-C

    - (void)notificationRegistrationFinishedWithOptions:
                (UANotificationOptions)options
                                             categories:(nonnull NSSet *)categories;

    Swift

    optional func notificationRegistrationFinished(options: UANotificationOptions = [], categories: Set

    Parameters

    options

    UANotificationOptions that were most recently registered.

    categories

    NSSet of the categories that were most recently registered.

  • Called when APNS authentication changes with the new authorized options.

    Declaration

    Objective-C

    - (void)notificationAuthorizedOptionsDidChange:(UANotificationOptions)options;

    Swift

    optional func notificationAuthorizedOptionsDidChange(_ options: UANotificationOptions = [])

    Parameters

    options

    UANotificationOptions that were most recently registered.