classiOS9AndBelowRemoteNotificationHandler: iOS9AndBelowRemoteNotificationHandling {
let didReceiveRemoteNotificationHandlers = WeakContainer<iOS9AndBelowRemoteNotificationPayloadHandling>()
}
Required call in UIApplicationDelegate
extensionAppDelegate { // iOS9AndBelowRemoteNotificationHandlingfuncapplication(_application: UIApplication, didFinishLaunchingWithOptionslaunchOptions: [UIApplicationLaunchOptionsKey: Any]?) ->Bool {
RemoteNotificationManager.shared.iOS9AndBelowHandler?.application(application, didFinishLaunchingWithOptions: launchOptions)
returntrue
}
funcapplication(_application: UIApplication, didRegisternotificationSettings: UIUserNotificationSettings) {
RemoteNotificationManager.shared.iOS9AndBelowHandler?.application(application, didRegister: notificationSettings)
}
/// - note: Opening the app by tapping the icon will never give you information about previous notifications. It's only if you actually open the app via a notification that you will be able to access the notification data. (from [Stackoverflow](https://stackoverflow.com/a/13847840))funcapplication(_application: UIApplication, didReceiveRemoteNotificationuserInfo: [AnyHashable : Any]) {
RemoteNotificationManager.shared.iOS9AndBelowHandler?.application(application, didReceiveRemoteNotification: userInfo)
}
}