When user login in the application I am connecting the Tokbox session which is successfully working. But if logout now and disconnect the session and login again then tokbox session is not getting connected. Following error is coming
The operation couldn’t be completed. (OTSessionErrorDomain error 1006.)
I have checked the session and token and they are valid.
The issue is with the disconnect of TokBox session. use this to disconnect from the TokBox:-
session!.disconnect(&error)
if error != nil {
print("Session Error while Disconnecting session: \(error!.localizedDescription)")
} else{
print("disconnectFromSession: Session disconnection request sent")
}