Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get all push notifications received since app was last open

I'm creating an iOS 10 app using Xcode 8 and CloudKit. When the app loads, is there any way to read all push notification that have been sent since the last time the app was running?

like image 299
liam923 Avatar asked Jun 05 '17 03:06

liam923


People also ask

How do I pull up old push notifications?

Scroll down and long-press the “Settings” widget, then place it on your home screen. You'll get a list of features that the Settings shortcut can access. Tap “Notification Log.” Tap the widget and scroll through your past notifications.

Can you see old push notifications on iPhone?

From the lock screen, swipe up from the middle to see your notifications. If your iPhone is already unlocked, you can swipe down from the top to see your old notifications.

How do you view notifications that have already been opened?

Pull down your Notification Shade once and then scroll down to the bottom of your notifications. You should now see a History button (Figure 3). The History button has been added to your Notification Shade. Tap History to access your past 24 hours of notifications (Figure 4).

How do I see notifications after they disappear?

Open the Settings menu on your Android smartphone running stock Android 11. Scroll down to Apps & Notifications from the menu and select and tap Notifications. Tap Notification history and ensure that the Use notification history toggle is enabled.


1 Answers

You can call the following function, request contains all notifications delivered

[[UNUserNotificationCenter currentNotificationCenter]
getDeliveredNotificationsWithCompletionHandler:^(NSArray<UNNotificationRequest
 _Nonnull requests) {
           NSLog(@"");
   }];
like image 91
Quang Vĩnh Hà Avatar answered Nov 14 '22 22:11

Quang Vĩnh Hà