Hi, I have a problem with the SendBird Calls when the ios app is closed.
When I receive a VoIP call notification, I accept it, and the app opens the VideoCallViewController but, immediately after the connection status, the vc is closed (the vc says that the call is completed). I struggle to debug it and I don’t understand why the call is closed immediately after the connection, any ideas?
Ah the call doesn’t seem to be finished, among the active apps I see that the call system view is active but both app and web show the call as completed.
I added an alert in the didEnd(_ call: DirectCall) [DirectCallDelegate] and i get the following result:
func didEnd(_ call: DirectCall) {
self.setupEndedCallUI()
let enderUserId = call.endedBy?.userId
let myUserId = SendBirdCall.currentUser?.userId
let iCloseTheCall = enderUserId == myUserId && myUserId != nil
Alert.i.alertOnTopViewController(message: "Did I finish the phone call? \(iCloseTheCall) | End result: \(call.callLog?.endResult.rawValue ?? "no result")", style: .alert)
guard let enderId = call.endedBy?.userId, let myId = SendBirdCall.currentUser?.userId, enderId != myId else { return }
guard let call = SendBirdCall.getCall(forCallId: self.call.callId) else { return }
CXCallManager.shared.endCXCall(call)
}