保留 iOS 4 中所有本地推送通知的列表

发布于 2024-09-07 08:28:22 字数 142 浏览 2 评论 0原文

作为我正在编写的应用程序的一部分,它保留提醒列表并使用本地通知在所需的时间显示它们。

我想确定的是这些通知的列表,这样我就不必在每次编辑或新通知时重新创建列表。

是否有任何文档或示例/教程可以证明这种行为?

谢谢, 马特。

As part of an app I'm writing, it keeps a list of reminders and uses local notifications to display them at the required time.

What I would like to determine is a list of these notifications so that I don't have to recreate the list upon each edit or new notification.

Is there any documentation or examples/tutorials that demonstrate this behaviour?

Thanks,
Matt.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

岁吢 2024-09-14 08:28:22

他说的是本地通知,而不是推送通知。您可以使用
[[UIApplication sharedApplication] ScheduledLocalNotifications] 获取计划通知的完整列表。

He is talking about local notifications, not push notifications. You can use
[[UIApplication sharedApplication] scheduledLocalNotifications] to get the complete list of scheduled notifications.

不寐倦长更 2024-09-14 08:28:22

不,恐怕这不是一个好的选择。推送通知并不意味着用作真实数据,它可能会过期、被较新的通知覆盖等。通知可以让 iOS 启动您的应用程序,但仅此而已,这不会 100% 发生(用户可能会忽略)通知)。

No, and I’m afraid it’s not a good choice. Push notifications are not meant to be used as true data, and it can expire, get overwritten by newer notifications, etc. Notifications can have iOS launch your app, but that’s it and that’s not going to happen 100% (the user might just dismiss the notification).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文