Closed fmonsalvo closed 1 year ago
Hi @bobiechen-twilio
Hi @PCGurjar Sounds like in some cases, especially when the app is terminated and the VoIP notification arrives, the application is not reporting to CallKit in a timely manner. Please check the behavior of the app when incoming call VoIP push is received in different app states - active, background, not running (terminated).
Our quickstart sample code should provide the way how to set up the PkPushRegistry at app launch time and handle incoming pushes including signaling other components and reporting to CallKit.
By the way just want to make sure - are you using the Twilio Video SDK or the Voice SDK?
Hi @bobiechen-twilio I am using Video SDK for this.
Hi @PCGurjar
Please check out the Video or Voice quickstart and make sure your native code follows Apple's guideline.
Do this first, Important!
Add below code is inside : func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType, completion: @escaping () -> Void)
Use completion() in main thread.
Description
I have a react-native application that use a home built component to handle Twilio communication. We have upgraded to latest 5.x twilio iOS SDK and latest Android SDK. On Android it works great. On iOS the calls work perfect when the app is in foreground but it fails when the app is killed and the phone locked. I followed all the issues and the migration guides to no avail. I'm sure there's something wrong in the code as I'm experiencing what is described in issue #251 but I'm not sure what's wrong. When the phone is killed pushRegistry:didReceiveIncomingPushWithPayload:forType:withCompletionHandler is never called and then I get an error saying
Killing VoIP app <private> because it failed to post an incoming call in time.
Steps to Reproduce
Killing VoIP app <private> because it failed to post an incoming call in time.
Error.Expected Behavior
That I receive a call
Actual Behavior
Nothing happens.
Reproduces How Often
Always
Versions
Voice iOS SDK
5.1.1
Xcode
11.3.1
iOS Version
13.3.1
iOS Device
iPhone 6s Plus