ios - Posting Uilocalnotification dynamically after some validation of code before triggerring the notification -
I want to set up a UILocal notification in my app, I will set the fired in notification for 6 hours. Application, But before the notification starts, I have to validate my position, if this condition meets, then I should not post the information, otherwise I will have to post the information. How can I handle this situation?
Post ULocationNotification set for 6 hours in advance. Use the
userInfo dictionary to mark the notification (ex:
@ {@ "valid": @NO} ).
Check for your
application: didReiveiveLocalNotification: handler,
valid flag. If this is not valid, do so. If this verification passes, then post the notification again in a future millisecond.
If there is a valid notification, show it.
Original idea:
- Post notification for a non-valid status set for 6 hours later.
- Receive notifications, check if it is valid.
- If not valid, valid and repost in the valid status immediately.
- If it is valid, show the information as usual.
- All notifications that do not pass certification.
Comments
Post a Comment