I'm trying to setup a UILocalNotification object's repeatInterval attribute. It works well with NSDayCalendarUnit, but I need to set a repeat interval of every three days. I've tried NSDayCalendarUnit + 3, but that doesn't work. Any ideas?
No, that is not working either. If I schedule
localNotify.repeatInterval = NSDayCalendarUnit the log shows:
{fire date = 2010-07-16 02:40:00 -0400, time zone = US/Eastern (EDT) offset -14400 (Daylight), repeat interval = 16, next fire date = 2010-07-16 02:40:00 -0400}
If I schedule localNotify.repeatInterval = NSDayCalendarUnit*3 the log shows:
{fire date = 2010-07-16 02:30:00 -0400, time zone = US/Eastern (EDT) offset -14400 (Daylight), repeat interval = 48, next fire date = 2010-07-17 03:30:00 -0400}
So repeat interval goes forward by one hour on the following day, instead of what I want which is for it to repeat in 3 days time. Any suggestions?
NSDayCalendarUnit
is an enumeration constant; arithmetic has no sensible meaning in relation to it.
I do not believe the current local notifications API allows for the interval you want. You should file a bug report with Apple and request more fine-grained control of local notifications.