Is it possible to do this? UIApplication\'s
scheduledLocalNotifications
doesn\'t seem to return notifications that have already been delivered to t
Since iOS10 there is now native support for this if you have transitioned to using UNUserNotificationCenter
.
The Apple docs state:
func getDeliveredNotifications(completionHandler: @escaping ([UNNotification]) -> Void)
Provides you with a list of the app’s notifications that are still displayed in Notification Center.
func removeDeliveredNotifications(withIdentifiers: [String])
Removes the specified notifications from Notification Center.
func removeAllDeliveredNotifications()
Removes all of the app’s notifications from Notification Center.