Home:ALL Converter>How to receive data on click of notification in ios, when app is killed ,( react-native-fcm module to get push notification in IOS)

How to receive data on click of notification in ios, when app is killed ,( react-native-fcm module to get push notification in IOS)

Ask Time:2016-11-24T19:05:49         Author:prince verma

Json Formatter

I had designed the app using react native in both android and ios, and uses raact-native-fcm module for push notifications from server. In android we send only data payload from server and it is received in onMessageReceived() weather the app is in foreground or minimised( background ) or killed,and then i can handle that data to show local notification which is doing fine. But in IOS I don't know where the data payload is received in app, or if in case of IOS I send the notification payload along with/without data payload , i was able to receive notification, when app is in background or killed or notification data in FCM.on('notification',()=>{}); event when app is in foreground. But when IOS app is killed i am not been able to handle the received notification, on click of notification app is opened but not able to get data or notification payload. please help me out.

Author:prince verma,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/40784790/how-to-receive-data-on-click-of-notification-in-ios-when-app-is-killed-react
yy