我可以从 native 通知中心应用程序获取我的应用程序推送通知列表吗?当我的应用程序启动时,我想显示在我的应用程序未运行时收到的通知。
最佳答案
实际上您可以使用 iOS 10 获取通知列表
为此,您在 UNUserNotificationCenter
中有方法
// Notifications that have been delivered and remain in Notification Center.
open func getDeliveredNotifications(completionHandler: @escaping ([UNNotification]) -> Swift.Void)
然后这样做
UNUserNotificationCenter.current().getDeliveredNotifications(completionHandler: { (notifications) in
// do what you whant with the notifications array
})
关于ios - 推送通知列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41714415/