Custom repeat interval for UILocalNotification

后端 未结 1 1473
抹茶落季
抹茶落季 2020-12-03 02:05

I tried the Re.minder app and noticed that it can repeat reminders with custom intervals (such as every 3 minutes, every 2 hours, every 4 days,...).

How can I do th

相关标签:
1条回答
  • 2020-12-03 02:44

    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.

    Hope that helps!

    0 讨论(0)
提交回复
热议问题