获取应用程序上次打开时收到的所有推送通知
答
您可以调用下面的函数,request
包含了所有的通知从IOS 10.x中我们可以得到待定交付
[[UNUserNotificationCenter currentNotificationCenter]
getDeliveredNotificationsWithCompletionHandler:^(NSArray<UNNotificationRequest
_Nonnull requests) {
NSLog(@"");
}];
答
并交付使用UNUserNotificationCenter
你通知信息与应用的通知列表仍然显示在通知中心使用以下功能
func getDeliveredNotifications(completionHandler:@escaping([UNNotification]) - > Void)
refrer below link for more details
+1
我们可以在ios 9.x中获得待处理通知列表吗? – 2017-06-06 03:28:58
iOS 9怎么样? – Jaybo