且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

UILocalNotification的自定义重复间隔

更新时间:2023-02-26 21:43:56

感谢您试试我们的应用程序!事实证明,我们实际上并没有使用UILocalNotification repeatInterval来实现这一点。鉴于它的局限性(只有一个NSCalendarUnit),我们实际上编写了自己的调度程序。这有其自身的局限性,主要是每个应用程序的64个本地通知队列限制。我们基本上安排并构建自己的队列,然后从中填充本地通知。每当用户在应用中启动或进行更改时,我们都会重新安排。

Thanks for trying our app! It turns out, we're not actually using UILocalNotification repeatInterval to accomplish that. Given it's limitations (only one NSCalendarUnit), we actually wrote our own scheduler. This has it's own limitations, mainly the 64 local notification queue limit per app. We essentially schedule and build our own queue, then fill the local notifications from that. Any time the user launches or makes a change in the app we reschedule.

希望有所帮助!