0

How to retrieve and handle the payload data from the app in background & foreground in iOS. I got the push notifications working, but I don't know how to extract the response.

notificationCallbackIOS: (message: any) => {
console.log("Message : " + JSON.stringify(message));
}

"nativescript-push-notifications": "^1.1.3"

This callback is not working. I am unable to extract the payload data like action, title.

Yannis
  • 1,682
  • 7
  • 27
  • 45
Priyanga Manivelan
  • 432
  • 1
  • 5
  • 14

1 Answers1

0

You could try to use this plugin https://github.com/EddyVerbruggen/nativescript-local-notifications

it has a addOnMessageReceivedCallback event for listening for incoming notifications. I also used it on my app that i'm developing now. Even its for local notification, it also listens for remote notification you can call it on your app.component.ts.

Jannomeister
  • 621
  • 4
  • 23