I am trying to retrieve all delivered notifications still showing in the notification center but
UNUserNotificationCenter getDeliveredNotifications(completionHandler:)
just doesn't work. I can get all the pending notifications with
UNUserNotificationCenter getPendingNotificationRequests(completionHandler:)
but
getDeliveredNotifications
will simply always return a 0 count even though there are notifications on the notification center.
I have noticed that this works in iOS 10 but not in iOS 11. Anyone has found a way to fix this?