iOS double notification while app is in the background #158
Closed
Description
Bug report
Current behavior:
While app is in the background and foreground_notification is set to true, receive 2 notifications in status bar instead of one. This is happening only when push notification using APNS token. When push notification with firebase token, with same payload, all works fine.
Receiving 2 notification instead of one while app is in the background
I tested on exaple project, it act the same as on my project
Expected behavior:
Receive one notification while app is running in the background and when receive notification from APNS with foreground_notification key set.
Steps to reproduce:
- Run app
- Get tocken usnig method getApnsToken
- Use apns token to apns push notification
Environment information
- Cordova CLI version
- Cordova platform version
- cordova platform ls
- Plugins & versions installed in project (including this plugin)
- cordova plugin ls 6.1.0
- Dev machine OS and version, e.g.
- OSX 10.14.4
Runtime issue
- OS details
- iOS 12.1,
iOS build issue:
- Node JS version
10.15.3 - XCode version
10.1
Related code:
{
"aps":{
"alert":{
"body":"Test",
"title":"Test"
},
"content-available":1,
"category":"NEW_MESSAGE_CATEGORY",
"badge":2,
"mutable-content":1,
"sound":"default"
},
"notification_foreground": true
}