2

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.

nynohu
  • 1,628
  • 12
  • 12
Avinay Kumar
  • 163
  • 2
  • 9

3 Answers3

2

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

cjensen
  • 2,703
  • 1
  • 16
  • 15
1

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.

0

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.

Saurabh Prajapati
  • 2,348
  • 1
  • 24
  • 42
  • These are for incoming calls, what about ongoing calls? AFAIK, Apple CallKit has methods dealing with ongoing calls. But I think Sinch Framework only deals with incoming calls, doesn't it? – aytek Oct 19 '17 at 19:30
  • can you help me with that sample code of callkit as I am not getting it. Also in my swift project I am getting error "Use of undeclared type 'SINCallKitProvider'". – Pratyush Pratik Nov 28 '18 at 12:53
  • Sorry, but i have implemented this with Objective C, still i will check and let you know! – Saurabh Prajapati Nov 28 '18 at 13:06