Question

I read a lot of documentation and code about UILocalNotification. My alert occurs when the condition (a calculated value raise) a limit.

With localNotification.repeatInterval = NSHoursCalendarUnit

My Notification is resent every hours. How can I ask LocalNotificationCenter to make a calculation BEFORE sending (or not) the notification?

For exemple:

Value == 1 -> Notification, Value is one.

Every hours recalculate Value if Value changed -> Notification, value is changed

Thanks in advance for your help, Jacques

Was it helpful?

Solution

Unfortunately you cannot set your own constraints when scheduling a local notification. The only thing you can do is to ignore the notification when it fires. (But when the application is closed you cannot do anything about it)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top