Possible Duplicate:
Push notifications – catching them?
The question is :
-
the iOS receives a push notification and pops up an alert dialog with two button “Cancel” and “View”, and the badge num on the application icon increases by 1
-
User taps the “Cancel” button and the alert dialog just dismisses, the application icon badge num remains unchanged
-
User lauches the application by tapping the application icon in the homescreen
How to get the push notification object or data in it after the application launch ?
(Or is there anyway to get noticed when a push notification arrives and fetch the data in it before the iOS pops out the alert dialog ?)
Unfortunately, if your user ignores a push notification, your app doesn’t get an opportunity to receive information from that notification, since
didReceiveLocalNotification:will not be called.You would instead have to use your application server to store information about the notifications that went out, and fetch that information each time you start your app.