我正在尝试检索仍显示在通知中心的所有已发送通知,但UNUserNotificationCenter getDeliveredNotifications(completionHandler:)无法正常工作。我可以获得所有待处理的通知,UNUserNotificationCenter getPendingNotificationRequests(completionHandler:)但getDeliveredNotifications即使通知中心有通知,也只会返回 0 计数。
UNUserNotificationCenter getDeliveredNotifications(completionHandler:)
UNUserNotificationCenter getPendingNotificationRequests(completionHandler:)
getDeliveredNotifications
swift swift3 unnotificationrequest unusernotificationcenter
swift ×1
swift3 ×1
unnotificationrequest ×1
unusernotificationcenter ×1