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)
iOS check if a UILocalNotification condition occurs
-
24-03-2022 - |
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
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow