func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
if let controller = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "showSplashScreen") as? ShowSplashScreen {
if let window = self.window, let rootViewController = window.rootViewController {
var currentController = rootViewController
while let presentedController = currentController.presentedViewController {
currentController = presentedController
}
currentController.present(controller, animated: true, completion: nil)
}
}
}
应用程序运行后,当我单击fcm推送通知时,它会很好地打开。但是,当我在后台退出我的应用程序时,我单击了fcm push通知,它不起作用。似乎应用被杀死了。 单击fcm通知时要运行我的应用程序该怎么办? (当应用未运行时)