ios - detect unacknowledged UILocalNotifications -


it seems that

didfinishlaunchingwithoptions:(nsdictionary *)launchoptions

and

didreceivelocalnotification:(uilocalnotification *)notification

are triggered if user acknowledges uilocalnotification, example swiping slider or touching entry in ios's notification pull-down.

is there way tell uilocalnotification has gone off if user ignores uilocalnotification , re-enters app clicking on app icon?

i should mention applies repeating notifications because firing of non-repeating notifications can detected observing total count. is, when fire, vanish [[uiapplication sharedapplication] scheduledlocalnotifications].

i'm looking like..

[[uiapplication sharedapplication] unacknowledgedlocalnotifications]

alas, can't find it.

well, can check scheduled notifications inside [[uiapplication sharedapplication] scheduledlocalnotifications]. find out if scheduled repeating notification has fired access firedate property see initial date set notification. check repeatinterval property.

so there have 2 variables, 1 initial nsdate, lets 2013-05-08 12:00 , second repeat interval, lets daily. , doing [nsdate date] current date i'm located (in sweden) 2013-05-09 22:45. means there 1 notification user has not acted on.

so need create method take these arguments , iterate initial date see how many notifications have been missed until current datetime.

you find nscalendars datebyaddingcomponents:todate:options useful.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -