Custom repeat interval for UILocalNotification

Arnol picture Arnol · Apr 23, 2011 · Viewed 9k times · Source

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 that?

Answer

Jeremy Handel picture Jeremy Handel · Apr 23, 2011

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!