             class_getInstanceMethod(newClass,
                 NSSelectorFromString("userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:")) != nil {
             selector = NSSelectorFromString("userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:")
-            newSelector = #selector(UIResponder.userNotificationCenter(_:newDidReceive:withCompletionHandler:))
+            newSelector = #selector(NSObject.userNotificationCenter(_:newDidReceive:withCompletionHandler:))
         } else if class_getInstanceMethod(aClass, NSSelectorFromString("application:didReceiveRemoteNotification:fetchCompletionHandler:")) != nil {
             selector = NSSelectorFromString("application:didReceiveRemoteNotification:fetchCompletionHandler:")
             newSelector = #selector(UIResponder.application(_:newDidReceiveRemoteNotification:fetchCompletionHandler:))

            if class_getInstanceMethod(delegateClass,
                    NSSelectorFromString("userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:")) != nil {
                let selector = NSSelectorFromString("userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:")
                let newSelector = #selector(UIResponder.userNotificationCenter(_:newDidReceive:withCompletionHandler:))
                let block = { (view: AnyObject?, command: Selector, param1: AnyObject?, param2: AnyObject?) in
                    if let param2 = param2 as? [AnyHashable: Any] {
                        self.delegate?.trackPushNotification(param2, event: "$campaign_received")

            }
        }
    }
}

@available(iOS 10.0, *)
extension NSObject {
    func userNotificationCenter(_ center: UNUserNotificationCenter, newDidReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
        let originalSelector = NSSelectorFromString("userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:")
        if let originalMethod = class_getInstanceMethod(type(of: self), originalSelector),
