react-native-fcm ios not getting notification data in background

413 Views Asked by At

I'm sending notification from C# code

 {
        to: "fcm_token",
        notification: {
            body: "body test",
            title: "title test"
        }, 
       data:{
              body: "body test",
             title: "title test", 
             type="newentry"
        },
content_available:true
        }

I'm receiving notification on ios. I'm performing some actions in FCM.on(FCMEvent.Notification, notif => { method.

this.notificationListener = FCM.on(FCMEvent.Notification, async (notif) => { method is only called when iOS app is in foreground not in background. When opening app clicked from notification this is never called.

0

There are 0 best solutions below