Home:ALL Converter>Get data from push notification (FCM) without do click in notification

Get data from push notification (FCM) without do click in notification

Ask Time:2017-01-19T20:22:54         Author:Xeros Grey

Json Formatter

I already can manage push notifications from FCM when the app is in Foreground or background, when I do click in notification popup and open app "application didReceiveRemoteNotification" work without problem

My problem is that i don't know how get notification push data if the user open the app normaly (do click in icon app instead of click in notification) and I would lost the data if he close the notification

Author:Xeros Grey,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/41741732/get-data-from-push-notification-fcm-without-do-click-in-notification
anas.p :

If the app is in background state UINotification called application didReceiveRemoteNotification , If app is in open state UINotification called application:didFinishLaunchingWithOptions, And can't possible to get data without click on notification in iOS.",
2017-01-19T12:38:39
yy