Search code examples
iosswift5agora.iocallkit

When I end call from callKit call doen't ends I am able to see green StatusBar


I am developing one app using callKit and Agora video calling library In that app when I end the call from callKit and go in background I am able to see green StatusBar

Here is my code for end call :

 let endCallAction = CXEndCallAction(call: call.uuid)
    let transaction = CXTransaction(action: endCallAction)
    callController.request(transaction) { error in
        if let error = error {
            print("EndCallAction transaction request failed: \(error.localizedDescription).")
            return
        }

        print("EndCallAction transaction request successful")

    }

Solution

  • Your class should implement CXProviderDelegate which has provider(_ provider: CXProvider, perform action: CXEndCallAction) function, and you should fulfill the action inside this function.

    See https://developer.apple.com/documentation/callkit/cxproviderdelegate