user130306
user130306

Reputation:

iOS check if a UILocalNotification condition occurs

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

Upvotes: 1

Views: 216

Answers (1)

gsach
gsach

Reputation: 5775

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)

Upvotes: 2

Related Questions