iPhone 的 UILocalNotification 最大数量
有谁知道iphone操作系统支持的UILocalNotification的最大数量? Apple 文档提到最大数量为 64,但我想知道这是针对每个应用程序还是针对所有应用程序。
Does any know the maximum number of UILocalNotification supported by iphone OS ? Apple documentation talks about a maximum number of 64 but I wonder if that is for each application or for all applications together.
Documentation at:
http://developer.apple.com/library/ios/#documentation/iphone/Reference/UILocalNotification_Class/Reference/Reference.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
限制是针对每个应用程序的。
The limitation is per app.
查看文档以获取更多信息
Check the Doc for more info
似乎在 iOS 8.1 中,每个应用程序可以安排超过 64 个通知,并且所有通知都会被解雇。在我的应用程序中,我使用 500 条及更多本地通知进行了测试,所有通知均在 iPhone 模拟器和真实 iPhone 5s 上进行安排和触发。也许这是 iOS 8.1 中的一个错误,或者 Apple 忘记更新文档。
It seems that in iOS 8.1 it is possible to schedule more than 64 notifications per app and all get fired. In my app I tested it with 500 and more local notifications and all get scheduled and fired on iPhone Simulator an on a real iPhone 5s. Maybe this is a bug in iOS 8.1 or Apple forgot to update the documentation.
本地通知主要适用于具有基于计时器的行为的应用程序和简单的日历或待办事项列表应用程序。在后台运行的应用程序还可以安排本地通知来通知用户传入的消息、聊天或更新。一个应用程序只能有有限数量的预定通知;系统保留最快触发的 64 个通知(自动重新安排的通知计为单个通知)并丢弃其余的。
https://developer.apple.com/library/ios /documentation/iphone/Reference/UILocalNotification_Class/index.html
Local notifications are primarily intended for apps with timer-based behaviors and simple calendar or to-do list apps. An app that is running in the background may also schedule a local notification to inform the user of an incoming message, chat, or update. An app can have only a limited number of scheduled notifications; the system keeps the soonest-firing 64 notifications (with automatically rescheduled notifications counting as a single notification) and discards the rest.
https://developer.apple.com/library/ios/documentation/iphone/Reference/UILocalNotification_Class/index.html