voximplant / react-native-voximplant

Voximplant mobile SDK for React Native (iOS/Android)
http://voximplant.com
205 stars 39 forks source link

IOS 13 Support and VOiP notifications #98

Closed Linoa65 closed 4 years ago

Linoa65 commented 4 years ago

Hello !

I'm actually using Voximplant VOiP push notification to handle calls on app background/close on iOS. Apple told us that iOS 13 will change the logic and the app will crash if VOiP notification is not immediately send to CallKit to display the incoming call. I have requirement which prevent me to using CallKit because I need to display custom layout for incoming calls. Is there a way to avoid this with using data-only messages or remote notification from VI to be able to have a custom display of call ? I'm searching for a definitive solution, and I totally can't use the CallKit for my requirements.

Sincerely Florient

YuliaGrigorieva commented 4 years ago

Hello @Linoa65 ,

Unfortunately, we support only VoIP push notifications for iOS that require to use CallKit. VoIP notifications are the special kind of data messages.

Currently, I see only the option to connect Voximplant application with a third-party push service from which non-VoIP push notifications will be sent. It will require changes in your VoxEngine scenario and on the application side as well.

  1. Handle AppEvents.Stated event to get the accessURL
  2. Handle a new call in the VoxEngine scenario via AppEvents.CallAlerting event
  3. Make a HTTP request to notify your push notifications platform to send a push notification to the callee, insert accessURL from step 1 to the push notification
  4. Wait for callee to receive a push notification. Once the callee receives it, it is required to make HTTP request using accessURL from the callee client to notify the VoxEngine scenario that the callee is logged in and ready to receive the incoming call. You need to handle this HTTP request via AppEvents.HttpRequest in your VoxEngine scenario.
  5. Create a call for the callee by using VoxEngine.callUser (or any other VoxEngine API)
  6. Use VoxEngine.easyProcess API to send media between these calls.

Please note that non-VoIP push notification is less stable than VoIP push, it may not be received by the application or may be received with a delay critical for a call.

Best regards, Yulia Grigorieva