window.FirebasePlugin.onNotificationOpen(function (notification) {
alert(notification)
}, function (error) {
alert(error)
})`
I'm working on IOS 12.
I can receive notifications when the app is in the foreground, however when the app is in the background or killed, no banner appears on my phone & I receive no push notification.
This is the firebase payload I'm using to send the notification:
`{
"to": ***",
"priority": "high",
"data": {
"title": "hi",
"body": "hi"
},
"notification": {
"title": "hi",
"body": "hi",
"sound": "default",
"click_action": "FCM_PLUGIN_ACTIVITY",
"icon": "fcm_push_icon",
"content_available": true,
"apnsPushType": "alert"
},
"apns": {
"headers": {
"apns-push-type": "alert",
"apns-priority": 10,
"apns-topic": "org.benchmark.app",
Can y'all help me understand is this a problem with my apple/firebase configuration or is there something I have to do with this plugin to register for those banner notifications?
Expected behavior
Receive a push notifications with banner & alert when app is in the background
Describe the bug I have gone through the process to implement push notifications through firebase in my cordova app including:
Specifically for this plugin I run the following methods on init of the app:
window.FirebasePlugin.onNotificationOpen(function (notification) { alert(notification) }, function (error) { alert(error) })`
I'm working on IOS 12.
I can receive notifications when the app is in the foreground, however when the app is in the background or killed, no banner appears on my phone & I receive no push notification.
This is the firebase payload I'm using to send the notification: `{ "to": ***", "priority": "high", "data": { "title": "hi", "body": "hi" }, "notification": { "title": "hi", "body": "hi", "sound": "default", "click_action": "FCM_PLUGIN_ACTIVITY", "icon": "fcm_push_icon", "content_available": true, "apnsPushType": "alert" }, "apns": { "headers": { "apns-push-type": "alert", "apns-priority": 10, "apns-topic": "org.benchmark.app",
}`
Can y'all help me understand is this a problem with my apple/firebase configuration or is there something I have to do with this plugin to register for those banner notifications?
Expected behavior Receive a push notifications with banner & alert when app is in the background
Plugin Version
2.0.5