Sinch - callDidEstablish is not getting called on Lock screen while answering call from CallKit

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 04:46:36

问题


Sinch - callDidEstablish is not getting called on Lock screen while answering call from CallKit.

I have integrated CallKit but answering call from Lock screen sinch call delegate method is not getting called to establish call.

I also went through iOS Sinch Document it says :-

Invoking -[SINCall answer] while being in the background is possible. The call is not immediately answered but the operation is considered pending and the call answered once the app returns to the foreground.

Is there any way to establish call on answering it from Lock screen.

Thanks in Advance.


回答1:


Currently our SDK doesnt work with Callkit, we are working on it and will have a release soon (sorry no date yet)




回答2:


You have to implement CXProviderDelegate to receive callKit actions delegate,

Implement this method from CXProviderDelegate.

-(void)provider:(CXProvider *)provider didActivateAudioSession:(AVAudioSession *)audioSession {

[_client.callClient provider:provider didActivateAudioSession:audioSession];

}

and your callDidEstablish will start getting called.




回答3:


This is now possible with latest Sinch SDK. You can find it at Sinch downloads.

They have also given demo Example with SDK.

SINCallKitProvider is class responsible for callKit.Which you can copy from sample example.

Also they have added new Delegate method for it , you can use it as below:

-(void)client:(id<SINCallClient>)client willReceiveIncomingCall:(id<SINCall>)call{
    [_callKitProvider reportNewIncomingCall:call];
}

Hope that will help you.



来源:https://stackoverflow.com/questions/41759009/sinch-calldidestablish-is-not-getting-called-on-lock-screen-while-answering-ca

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!