I have a little programming challenge. In my app I’m using repeating UILocalNotifications. I have written a method to deal with ignored notifications, in the method I check if a notification has been ignored then I log this to a Core Data entity called EntityA. So say for instance a repeating notification is set to repeat every day. If the user ignores that notification for 10 days, we would have 10 missed notifications, which would be 10 EntityAs.
Where would it be appropriate to put this method when I check for ignored notifications? I’m thinking in:
application:didFinishLaunchingWithOptions: – If the application wasn’t running when notification was fired
applicationWillEnterForeground: – If application was in the background when notification was fired and the user ignored the notification
I decided to put the checking methods in
application:didFinishLaunchingWithOptions:andapplicationDidBecomeActive:That way my app will always have accurate data when launched.