I have the following appDelegate:
import UIKit
import CoreData
import UserNotifications
@available(iOS 11.0, *)
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate
{
var window: UIWindow?
...
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any])
{
print("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
}
}
I am using ios11 and swift 4.1 but the notification gets fired off correctly. But when I tap it I can't grab it in the app. Why? I am using xcode 9.4.1. Thanks.
The app is in the background and when the notification is tapped the app opens up.