iOS 10中本地通知(UNNotificationRequest)的限制 [英] Limit for Local Notifications (UNNotificationRequest) in iOS 10

查看:1018
本文介绍了iOS 10中本地通知(UNNotificationRequest)的限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道 UILocalNotification 的本地通知限制为64.它是用 Apple开发文档编写的.但是iOS 10中不推荐使用UILocalNotification.Apple建议使用 UNNotificationRequest .但是 Apple Dev Docs 并没有说要限制通知数量. 我发现了这个 answer ,但是它没有指向Apple Dev Docs或类似内容的链接(仅是一种意见). 谁能确切知道本地通知的限制? 也许有人知道与开发文档的链接,或者苹果对此有官方回应吗?

I know that the limit of local notifications is 64 for UILocalNotification. It's written in Apple Dev Docs. But UILocalNotification is deprecated in iOS 10. Instead this one, Apple proposes to use UNNotificationRequest. But Apple Dev Docs doesn't say anything about limiting the count of notifications. I found this answer, but it doesn't have links to Apple Dev Docs or something like that (it's just an opinion). Does anyone know for sure about restrictions of local notifications? Maybe someone know the link to Dev Docs or is there an official response from Apple about this?

推荐答案

尽管尚未正式记录,但测试表明UNNotificationRequest保留了64个通知限制.

Although it's not officially documented, testing shows that UNNotificationRequest retains the 64 notification limit.

但是,重要的是,它们处理通知队列的方式已更改.如果通知超过64个:

However, importantly, the way that they deal with the notification queue has changed. If there are more than 64 notifications:

  • UILocalNotification将保留64个最快通知
  • UNNotificationRequest保留64个最后一组通知
  • UILocalNotification would keep the 64 soonest notifications
  • UNNotificationRequest keeps the 64 last set notifications

这可能是一个错误,并记录在此雷达中.

This may be a bug, and is documented in this radar.

这篇关于iOS 10中本地通知(UNNotificationRequest)的限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆