views:

79

answers:

2

i have a local notification that I would like to fire every 5 minutes. I use: localNotif.repeatInterval=NSMinuteCalendarUnit
that will have the notification happen once every minute. I can't figure out how to get this to happen every 5 minutes or whatever other >1 minutes interval. I've tried localNotif.repeatInterval=5*NSMinuteCalendarUnit
and that doesn't work. Can anyone help me to solve this problem

A: 

Check out this blog http://useyourloaf.com/blog/2010/9/13/repeating-an-ios-local-notification.html

Has a tutorial on how to repeat notifications with an xcode project.

Also maybe it is worth using

NSLog(@"Count: %i", [[[UIApplication sharedApplication] scheduledLocalNotifications] count]); 

To check how many notifications your app has registered?

jodm
A: 

jissa you can't set a 5 minute interval by doing a 5 * NSMinuteCalendarUnit. The current implementation of UILocalNotification does not allow you to fine tune the interval. So you're stuck with every second, every minute, every hour, every day, every week, every month... etc etc.

I've filed a bug report/enhancement at http://bugreport.apple.com/

You may take a look at my report archived at Open Radar: http://openradar.appspot.com/radar?id=759402

According to Marco, developer of Instapaper, Apple prioritizes enhancement and feature requests partly based on how many developers are requesting them.

If this feature is important to you I urge you to file a report as well.

junjie