ios - Handling remote notification while app is totally off by launching from app icon -


i might fighting windmills need put clearance knowledge of remote notifications. want handle notification while app turned off (killed app switcher) user decides turn on not tapping on notification tapping on app icon.

as far know, when app killed , remote notification arrives user has tap on notification pass in launchoptions didfinishlaunchingwithoptions: but... want handle notification when user taps on app icon , nothing passed lauchoptions. in scenario, @ moment have no notification @ all...

is possible handle notification in background , perform action on no matter how app has been launched? maybe didreceiveremotenotification: fetchcompletionhandler:?

yeah, fighting windmills :)

i recommend read local , push notifications in depth. it's bit long doc clarifying.

in fragment of doc can read:

if application icon tapped on device running ios, application calls same method (application:didfinishlaunchingwithoptions:), furnishes no information notification.

and later on:

when handling remote notifications in application:didfinishlaunchingwithoptions: or applicationdidfinishlaunching:, application delegate might perform major additional task. after application launches, delegate should connect provider , fetch waiting data. listing 2-5 gives schematic illustration of procedure.

so having said have list of sent notifications each device in server , each time app launches check if device has pending notification.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -