I have some local notifications scheduled and I have to validate a condition before presenting the notification. If the condition doesn't satisfy, I have to cancel the notification i.e. I should not present it.
In iOS, I am aware that we do not have control to local notification when it is delivered (Like Android does). When breaking my head to support for all app states, couple of options comes to mind
1) Schedule another local notification (likely silent notification) 5 minutes before the actual schedule time and validate the condition. For example, if I have to schedule a local notification for 3 hours, I would create 2 local notifications. One, 5 minutes before 3 hours and the next one for 3 hours. But local notification would not wake up the app if app is NOT RUNNING, literally logic fails.
2) Silent push notification - which is the only possible weapon that I have to wake up the app. But server dependency is there.
Is there any other way to achieve this?
As of now (10/05/2016), it is not at all possible.