【发布时间】:2012-12-28 06:00:02
【问题描述】:
我想获取与我的应用程序相关的all the notifications,该应用程序存储在 iPhone 的 notification center 中。 How can I get this?
【问题讨论】:
标签: iphone ios notifications
我想获取与我的应用程序相关的all the notifications,该应用程序存储在 iPhone 的 notification center 中。 How can I get this?
【问题讨论】:
标签: iphone ios notifications
您可以使用[[UIApplication sharedApplication] scheduledLocalNotifications] 获取预定通知的完整列表。希望它会有所帮助。享受编码。
【讨论】:
对于本地通知,您可以获取与该应用相关的所有通知,
[[UIApplication sharedApplication] scheduledLocalNotifications]
但对于推送通知,我认为这是不可能的,但实现此目的的另一种方法是,如果用户查看/选择推送通知,那么您应该将其存储在本地。
【讨论】:
在之前的 2 个答案中已经描述了本地和推送通知。
notification center 中存储的其他内容可以是一个很好的例子here:
它旨在用作 UI 元素、屏幕、背景之间的通信。但可以用于其他“几乎合法”的东西,不会绕过 Apple 代码审查:私有 API、黑客攻击等如果开始在“不是 Apple 的预期”中使用 :)
它在通知中心,也是一个通知。
我确定你问的不是这个,因为:
“与我的应用相关”
这与您应用的一个组件有关。
【讨论】: