i have managed to get the notification details when app opens by tapping the notification but if the user is opening the app by just clicking the app icon is there any method to get the delivered notification details inside the app
func applicationWillResignActive(_ application: UIApplication) {
if #available(iOS 10.0, *) {
let center = UNUserNotificationCenter.current()
center.getDeliveredNotifications { (notification) in
print(notification.count)
}
} else {
// Fallback on earlier versions
}
}
here i have getting the notification count but i dont no how to get the details (userinfo) of the notification from here