Flutter Firebase Notification not working in killed state

303 Views Asked by At

I'm using flutter firebase messaging to receive push notifications, also I'm using flutter callkit incoming to delegate the notifications to Calls. When the app is in foreground or background mode, things work fine. But when app is killed, push notifications are received but calls are not received. It is working fine in Android but it doesnt work in iOS. For the foreground, and background state, we are using firebase notification and for the killed state we are using APNs.

I'm looking for some help on iOS side.

Below is my notification

{
  "message": {
    "android": {
      "notification": {
        "click_action": "Video"
      },
      "priority": "high"
    },
    "apns": {
      "headers": {
        "apns-priority": "10"
      },
      "payload": {
        "aps": {
          "content-available": 1,
          "mutable-content": 1
        }
      }
    },
    "data": {
      "callerAccessToken": "006030916dbd1494d74add49838cacb570fIAA9j48nGcIUT3PXdYvxqXmg0Civ0pdD+Ra852bM3qJkPPLSuz4AafalIgCyMj7BPvKIYwQAAQDevIdjAgDevIdjAwDevIdjBADevIdj",
      "calleeSflUserId": "24",
      "videoSessionId": "211",
      "title": "Incoming video call",
      "message": "There is a new video call from Ashish Physician.",
      "type": "NEW_VIDEO_CALL_REQUEST",
      "roomName": "local_11_49_24",
      "callerName": "Ashish Physician",
      "calleeAccessToken": "006030916dbd1494d74add49838cacb570fIADY7iNdg5hFW1P58+6OAiN2LjpQz7VVGX9JN32uF79C/fLSuz47sh2NIgCDs/0oPvKIYwQAAQDevIdjAgDevIdjAwDevIdjBADevIdj",
      "appointmentId": "11",
      "callerSflUserId": "49",
      "callerImageUrl": "https://tercardia-develop.s3.us-east-2.amazonaws.com/49/49_profileImage.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20221130T182814Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Credential=AKIAV6UT3MGE2DMFHIFS%2F20221130%2Fus-east-2%2Fs3%2Faws4_request&X-Amz-Signature=b0eea1f62f02041c62e60f1ed93c3d7bade1becd465feaf35519103e8b72c75f",
      "callStatus": "INITIATED"
    },
    "notification": {
      "body": "There is a new video call from Ashish Physician.",
      "title": "Incoming video call"
    },
    "token": "eB4PSWrDAkg1oyIk-q-dKc:APA91bH7XN2YlRIdUJSlcVAv6pKj8v_-Rd-cXqy0z_8ap__6v2XH05iTWfWNt_ZYtcX_iHu--YyiAW8SW1bET8lXDnpBSVjz2uv69RO54fTpo-5gdv66c_rZSKuRW8alfCTy6mPpts1S"
  }
}

I'm stuck on this since so long. Any help would be appreciated

0

There are 0 best solutions below