iOS : Immediately answering call from VOIP when app in kill mode, CXAnswerCallAction method doesn't call.(Using Swift)

422 views Asked by At

I'm implementing video call functionality using WebRTC, Implemented VOIP with call kit. Everything working fine except below.

Step1 : App in kill mode Step2 : Got the VOIP for incoming call Step3 : within minor milliseconds tap on answer call button from VOIP(Right Icon) Step4 : func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) {} this method doesn't call

Only cause the issue for kill-mode, working fine for background & foreground mode.

enter image description here

I'm reporting the call immediately when didReceiveIncomingPushWith this method called, Also triggering the completion() within that method.

Already enabled relevant capabilities.

enter image description here

Expected to happen is, That method should be called so I can perform socket related task.

1

There are 1 answers

0
K N Sarvaiya On

I have write func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) {} methond in AppDelegate.swift, it respond immediately after tap on Answer button from voip even app in kill mode.

Can write CXProviderDelegate required delegate methods in AppDelegate.swift.

Previously I had written in my custom CallManager class and handling from there so it wasn't able respond immediately.