No sound in first second of call with CallKit

Hello!


I have searched through internet, but there are no discussions about exactly this problem.


Customers of application which I support complain about problem: when I take incoming call, there is no sound for about 1 - 1.5 sec in iPhone 5s (new iPhones take less time) and Loudspeaker button is active during this time.


I checked with WhatsApp - they have this problem too. It looks like some iOS bug / specific behavior.


Did anyone find a workaround to fix it? Or information from Apple that it is specific behavior?


I've tried to configure [AVAudioSession sharedInstance] in 'provider:performAnswerCallAction:' method, in 'provider:didActivateAudioSession:'

method, in completion block of 'reportNewIncomingCallWithUUID:update:completion:' or before it. No success.

Replies

This could certainly be in the CallKit API. But one other source is that something is launched off the main queue. Have you tried:



dispatch_async(dispatch_get_main_queue(), ^{ some code here });

Thanks for advice.


I checked - seems that all CallKit methods (at least methods calling on answer call) are calling in main thread by default and there are no dispatches to global queue in my code.