Closed
Description
Encountered this issue when updating an app to the latest version of @nativescript/firebase-messaging-core (app had previously used @nativescript/firebase).
Sending the following notification to the app works on Android, but on iOS nothing happens when you tap it, the addOnMessage nor the addOnNotificationTap callbacks are triggered.
{
"aps": {
"alert": {
"title": "My title",
"body": "The body of the notification"
},
"badge": 9,
"sound": "sound"
},
"id": 123,
"url": "wp/v2/post"
}
However, adding "gcm.message_id" to it will trigger the callbacks:
{
"aps": {
"alert": {
"title": "My title",
"body": "The body of the notification"
},
"badge": 9,
"sound": "sound"
},
"id": 123,
"url": "wp/v2/post",
"gcm.message_id": "123"
}
In the userNotificationCenter(_:didReceive:withCompletionHandler:) function the registered callback is only fired if gcm.message_id is not null:
You shouldn't be required to add "gcm.message_id" to your notification call if you aren't using Firebase for iOS.