-1

Possible Duplicate:
How to set Local Notification repeat interval to custom time interval?

I want to repeat local notification for custom time interval(like 2 hours ,3 hours).

I know how to use repeatInterval for local notification. but by using that i can i can repeat notification for hour ,day ,week .

I want to repeat interval for random hours .

Community
  • 1
  • 1
alanzo
  • 55
  • 11
  • see this :[How to set Local Notification repeat interval to custom time interval?](http://stackoverflow.com/a/5131912/1126111) – Hector Jun 29 '12 at 06:47

1 Answers1

1

You can't do custom intervals. But what you can is create a loop to add UILocalNotification after a custom interval for a given time.

You always need to remove all notifications before and then readd them, or your users will get each notification x times.

The problem with this is a) it's not performance-friendly and b) if you add custom intervals for the next 2 weeks the user is forced to open your app to recreate the notifications.

UPDATE:

Each application on a device is limited to the soonest-firing 64 scheduled local notifications. The operating system discards notifications that exceed this limit. It considers a recurring notification to be a single notification.

Fabio Poloni
  • 8,219
  • 5
  • 44
  • 74