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.

Adi M
  • 11
  • 2
  • 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,001
  • 1
  • 10
  • 24