2017-06-05 88 views

回答

1

您可以調用下面的函數,request包含了所有的通知從IOS 10.x中我們可以得到待定交付

[[UNUserNotificationCenter currentNotificationCenter] 
getDeliveredNotificationsWithCompletionHandler:^(NSArray<UNNotificationRequest 
_Nonnull requests) { 
      NSLog(@""); 
    }]; 
+0

iOS 9怎麼樣? – Jaybo

0

並交付使用UNUserNotificationCenter

你通知信息與應用的通知列表仍然顯示在通知中心使用以下功能

func getDeliveredNotifications(completionHandler:@escaping([UNNotification]) - > Void)

refrer below link for more details

+1

我們可以在ios 9.x中獲得待處理通知列表嗎? – 2017-06-06 03:28:58

相關問題