FRAPushHandler

public class FRAPushHandler : NSObject

FRAPushHandler is mainly responsible to handle PushNotification activities in application layer and handling incoming Device Token, and Notification from the application.

Properties

  • shared instance of FRAPushHandler

    Declaration

    Swift

    public static var shared: FRAPushHandler

AppDelegate methods

  • Notifies FRAuthenticator SDK for successful Device Token registration; Device Token will be used for PushMechanism registration with AM

    Declaration

    Swift

    public func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data)

    Parameters

    application

    The app object that initiated the remote-notification registration process.

    deviceToken

    Device Token received from AppDelegate of the application

  • Notifies FRAuthenticator SDK for failure of Device Token registration; this nullifies existing Device Token

    Declaration

    Swift

    public func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error)

    Parameters

    application

    The app object that initiated the remote-notification registration process.

    error

    An error captured for device token registration

  • Notifies FRAuthenticator SDK for the recipient of Notification for the current application; FRAuthenticator SDK parses received Notification into PushNotification object for application to accept or deny push authentication request if the notification was from AM Push Authentication.

    Declaration

    Swift

    public func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) -> PushNotification?

    Parameters

    application

    The app object that received the remote-notification.

    userInfo

    Payload of remote-notification

    Return Value

    PushNotification object if the remote-notification is format of AM’s Push Authentication; otherwise returns nil