0

I'm newbie to iOS programming and was wondering if we could check which notification are active in iOS using swift. There's already a question How to check which notifications are active in status bar in Android Dev? on android, but I'm focussing on iOS. Can someone please help me with the same.

Aditya Malviya
  • 1,907
  • 1
  • 20
  • 25
  • Do you want notifications from your own app or all apps? You can't get notifications for other apps; that would be a privacy violation – Paulw11 May 16 '19 at 12:24

1 Answers1

0

Try this to get all the notifications active in your Notification tray for iOS.

UNUserNotificationCenter.current().getDeliveredNotifications { (notifications) in
    print(notifications)
}
manishsharma93
  • 1,039
  • 1
  • 11
  • 26