react-native-webrtc / react-native-voip-push-notification

React Native VoIP Push Notification - Currently iOS only
ISC License
211 stars 82 forks source link

App crashes when i receive a VOIP notification when a call is cancelled. #100

Open mayur-bhandari opened 1 year ago

mayur-bhandari commented 1 year ago

The example code is used to reportNewIncomingCalls but in my case I am sending VOIP notifications when a call is not answered by the user for X seconds. When i receive this VOIP notification I do not want to reportIncomingCall using CallKit. What options do I have? I also read in iOS Documentation that it is necessary to registerNewIncoming call when i receive VOIP notification because if i don't then it will stop sending VOIP notifications of my app.

awaisayub149 commented 1 year ago

Hey @mayur-bhandari did you get any solution for it?

diegods-ferreira commented 7 months ago

I'm facing this issue too. Whenever my app receives a VoIP Push Notification, it crashes

wilkinsonj commented 2 months ago

I'm also facing this issue. Did you guys ever resolve it?

wilkinsonj commented 2 months ago

Update for anyone else who runs into this, the payload needs to contain a data dictionary with 3 properties or it crashes:

const notificationPayload = {
  aps: {
    alert: {
      // add custom data here
    },
    sound: 'default',
    'content-available': 1 // Indicates a VoIP notification
  },
  type: 'voip',
  data: {
    handle: 'handle',
    callerName: 'Caller',
    uuid: uuid
  }
};