@ -91,10 +91,7 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
let update = CXCallUpdate ( )
update . remoteHandle = CXHandle ( type : . phoneNumber , value : call . remotePhoneNumber )
update . hasVideo = call . hasLocalVideo
update . supportsHolding = false
update . supportsGrouping = false
update . supportsUngrouping = false
update . supportsDTMF = false
disableUnsupportedFeatures ( callUpdate : update )
// R e p o r t t h e i n c o m i n g c a l l t o t h e s y s t e m
provider . reportNewIncomingCall ( with : call . localId , update : update ) { error in
@ -139,6 +136,11 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
AssertIsOnMainThread ( )
self . provider . reportOutgoingCall ( with : call . localId , connectedAt : nil )
let update = CXCallUpdate ( )
disableUnsupportedFeatures ( callUpdate : update )
provider . reportCall ( with : call . localId , updated : update )
}
func localHangupCall ( _ call : SignalCall ) {
@ -358,4 +360,19 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
de - activated after having its priority restored to normal .
*/
}
// MARK: - U t i l
private func disableUnsupportedFeatures ( callUpdate : CXCallUpdate ) {
// C a l l H o l d i n g i s f a i l i n g t o r e s t a r t a u d i o w h e n " s w a p p i n g " c a l l s o n t h e C a l l K i t s c r e e n
// u n t i l u s e r r e t u r n s t o i n - a p p c a l l s c r e e n .
callUpdate . supportsHolding = false
// N o t y e t s u p p o r t e d
callUpdate . supportsGrouping = false
callUpdate . supportsUngrouping = false
// I s t h e r e a n y r e a s o n t o s u p p o r t t h i s ?
callUpdate . supportsDTMF = false
}
}