From version < 58.1 >
edited by Danmei Chen
on 2020/11/25 23:05
To version < 59.1 >
edited by Danmei Chen
on 2021/03/22 10:51
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -192,6 +192,32 @@
192 192   }
193 193  {{/code}}
194 194  
195 +* Since sdk 4.5, **your CallKit delegate** MUST configure the **AVAudioSession **when a new call is incoming/outgoing, as follows:
196 +
197 +(((
198 +{{code language="swift"}}
199 +func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) {
200 + CallManager.instance().lc?.configureAudioSession()
201 + if (call == nil || call.state != Call.State.IncomingReceived) {
202 + // do something
203 + } else {
204 + // accept call here
205 + call.acceptWithParams(params: callParams)
206 + }
207 + action.fulfill()
208 +}
209 +
210 +func provider(_ provider: CXProvider, perform action: CXStartCallAction) {
211 + CallManager.instance().lc?.configureAudioSession()
212 + // start an outgoing call
213 + lc.inviteAddressWithParams(addr: addr, params: params)
214 + action.fulfill()
215 +}
216 +{{/code}}
217 +
218 +
219 +)))
220 +
195 195  === Display an incoming call ===
196 196  
197 197  {{code language="swift"}}