gpt4 book ai didi

ios - UNUserNotificationCenter.getDeliveredNotifications() 是否可用于检索用户定向的推送通知

转载 作者:行者123 更新时间:2023-11-29 05:36:30 25 4
gpt4 key购买 nike

如果服务器向用户发送推送通知,但用户没有点击该通知,应用程序仍然可以确定有推送发送到手机并使用 UNUserNotificationCenter.getDeliveredNotifications() 获取推送负载,或者此方法仅用于检索本地通知?

最佳答案

来自doc :

notifications

An array of UNNotification objects representing the local and remote notifications of your app that have been delivered and are still visible in Notification Center. If none of your app’s notifications are visible in Notification Center, the array is empty.

所以,是的,它还会返回尚未打开且在通知中心可见的推送通知。

关于ios - UNUserNotificationCenter.getDeliveredNotifications() 是否可用于检索用户定向的推送通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56991611/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com