gpt4 book ai didi

swift - UNUserNotificationCenter.current().getDeliveredNotifications 只返回空数组

转载 作者:搜寻专家 更新时间:2023-10-31 23:08:02 25 4
gpt4 key购买 nike

我正在尝试检索仍显示在通知中心的所有已发送通知,但 UNUserNotificationCenter getDeliveredNotifications(completionHandler:) 不起作用。我可以使用 UNUserNotificationCenter getPendingNotificationRequests(completionHandler:) 获取所有未决通知,但是 getDeliveredNotifications 将始终返回 0 计数,即使通知中心上有通知也是如此。

最佳答案

根据这个:NUserNotificationCenter.current().getDeliveredNotifications only ever returns an empty array

将徽章编号设置为 0 将清除您的远程通知。

会不会是这个问题?

关于swift - UNUserNotificationCenter.current().getDeliveredNotifications 只返回空数组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48185375/

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