Sinch VoIP push notification is not coming when app is in Closed state

1.4k Views Asked by At

I'm using SINCH VOICE for App to App calling. Voice calling works fine when app is in foreground and also in background. when the app is closed state, VoIP push not coming in receiver end or voice call does not come in receiver end. I created VoIP certificate from apple developer account and exported it from keychain and the imported p12 file in Sinch account. I enabled push notification and VoIP in general setting in xcode. Can any one please tell why the VoIP push notification not coming at receiver end?

1

There are 1 best solutions below

0
Eloy B. On

This can have multiple reasons, here are the most common ones for you to debug:

Wrong environment:

  1. Make sure you are setting the SINAppsEnvironment to development when building from XCode.

Mishandling VoIP push notification when App is in background

  1. Are you handling the incoming VoIP notification in accordance to iOS voip push guidelines? You need to report the incoming call to CallKit before executing any other code while your App is in the background.

https://developer.apple.com/videos/play/wwdc2019/707/ https://developer.apple.com/documentation/pushkit/responding_to_voip_notifications_from_pushkit

Your App is blacklisted by APNS

  1. If your App has previously violated the CallKit requirement then your App is blacklisted from receiving VoIP Push notification.

Step 1: Delete your app from the device.

Step 2: Turn the device off completely and turn it back on.

Step 3: Navigate to Settings > General > Date & Time and set the date ahead a day or more.

Step 4: Turn the device off completely again and turn it back on.

Step 5: Re-install your app and open it.

Step 6: Accept push permission request inside your App.

Step 7: Set the device Date and Time back to automatic

Step 8: Restart your device

How to debug from here?

Make sure you test on a device to rule out simulator issues

  1. Turn off Sinch event listener in your Sinch client. This will force your App to entirely rely on VoIP notifications and you will be able to better follow the logic your App takes to report to CallKit and handle the incoming Sinch Call.

  2. When running the app in background check your device log in XCode and check for any error throws regarding CallKit.