Reputation: 66320
I have a situation with UILocalNotification
. I know there is an answer how to cancel a uilocalnotification
My scenario is though:
Reading the document it says there is this one method that is called when the app is running: application:didReceiveLocalNotification:
. But this is only hit if the app is running at the time of event. What if the user doesn't come back?
Is there anyway my app could cancel all events after a certain number of inactive days have passed? I don't want to keep pestering the user, if there is no interest after all.
Upvotes: 0
Views: 106
Reputation: 19802
The only way is to setup all local notifications when you go to background. So you same notification several times with different date - each of them are single notification (non repeated).
Each time user opens you up you clean all of them with "cancelAllLocalNotifications" - each time he goes to background you create them all.
Upvotes: 2