问题
I have kind of to-do local notifications that are fired OK.
So for example if 2 notifications have fired the badge number goes to 2.
Now I like to handle these notifictaions also when the user just starts the app directly - not via the notifictaion center.
So the badge number would be 2, the user clicks on the app icon to start the app and the app should know which 2 notifications are in the notifictaion center.
While I know how to get all scheduled notifications BEFORE they fire - is there a way to access all the notifications that are present in the notification center since they HAVE FIRED.
Since the user could also clear the notifications from the notification center directly, there is really no way to keep track of the shown notifications in the notification center from within the app.
Thanks very much!
回答1:
iOS doesn't provide support for applications to query what notifications are in the Notification Center. The notifications are notifications to the user not to the app (at least not until the user acts on them).
来源:https://stackoverflow.com/questions/11993393/is-there-a-way-to-access-the-notifications-shown-in-the-notification-center