I am using firebase push notification, everything is running fine when app is in background and foreground state. But when app is in killed state, tap on notification leads to home page. I have used all possible ways- by using launch option check
if let remoteNotification = launchOptions?[.remoteNotification] as? [AnyHashable : Any] {
if let userInfo = remoteNotification as? [String : Any]
{
DispatchQueue.main.asyncAfter(deadline: .now()+1.0, execute: {
UIApplication.shared.applicationIconBadgeNumber = 0
let notificationManager = PushNotificationManager()
notificationManager.handleNotificationAction(data: userInfo)
})
}
}
I don't know what I am missing. Please help.