UnbluFirebaseUIApplicationDelegate

open class UnbluFirebaseUIApplicationDelegate : UIResponder, UIApplicationDelegate
extension UnbluFirebaseUIApplicationDelegate: UnbluFirebaseNotificationCoordinatorDelegate

Basic implementation of UIApplicationDelegate which overrides some application notification api callbacks for easy Firebase integration. Always call the super implementation of the delegate first, before handling the functions by your own.

  • The window used by iOS to attach UI content. If you create a UIWindow programmatically instead of using Storyboard, you should set it to this property.

    Declaration

    Swift

    public var window: UIWindow?
  • Uses UnbluFirebaseNotificationCoordinator and calls FirebaseApp.configure and sets the Messaging.messaging().delegate and checks if there was an initial notification from which the app was started. Please ensure to call this super implementation from within your AppDelegate

    Declaration

    Swift

    open func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]?) -> Bool
  • See original documentation from apple for didFailToRegisterForRemoteNotificationsWithError. If you override this function, please call super implementation first.

    Declaration

    Swift

    open func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error)
  • Called when received a remote notification. Will call on_application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) if it was not an unblu notification

    Declaration

    Swift

    public func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any])
  • Called when received a remote notification. Will call on_application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) if it was not an unblu notification

    Declaration

    Swift

    public func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void)
  • Called when the push notification token was received/updated via Firebase

    Declaration

    Swift

    open func on_messaging(didReceiveRegistrationToken fcmToken: String?)
  • Called instead of the original didReceiveRemoteNotification function as unblu needs to make sure it is called

    Declaration

    Swift

    open func on_application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any])
  • Called instead of the original didReceiveRemoteNotification function as unblu needs to make sure it is called

    Declaration

    Swift

    open func on_application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void)

UnbluFirebaseNotificationCoordinatorDelegate