Callkit loudspeaker bug / how WhatsApp fixed it?

前端 未结 5 1291
别那么骄傲
别那么骄傲 2021-02-02 10:08

I have an app with Callkit functionality. When I press the loudspeaker button, it will flash and animate to the OFF state (sometimes the speaker is set to LOUD but

5条回答
  •  再見小時候
    2021-02-02 10:30

    There is a workaround proposed by an apple engineer which should fix callkit not activating the audio session correctly:

    a workaround would be to configure your app's audio session (call configureAudioSession()) earlier in your app's lifecycle, before the -provider:performAnswerCallAction: method is invoked. For instance, you could call configureAudioSession() immediately before calling -[CXProvider reportNewIncomingCallWithUUID:update:completion:] in order to ensure that the audio session is fully configured prior to informing CallKit about the incoming call.

    From: https://forums.developer.apple.com/thread/64544#189703

    If this doesn't help, you probably should post an example project which reproduces your behaviour for us to be able to analyse it further.

提交回复
热议问题