Using Twilio conversations API in iOS Swift app. Obtaining token from our server, initialized TwilioConversationsClient
with this token,
func loginWithAccessToken(_ token: String) {
// Set up Twilio Conversations client
TwilioConversationsClient.conversationsClient(withToken: token,
properties: nil,
delegate: self) { (result, client) in
self.client = client
}
}
Expecting the client to synchronize with Twilio. Instead I receive error messages.
2023-03-22 22:44:46.186396-0700 app[21875:865489] Connection not set before response is received, failing task
2023-03-22 22:44:46.194863-0700 app[21875:865489] Task <724658EF-E3D3-4554-83C5-0975EE6C738C>.<1> finished with error [-1005] Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={NSErrorFailingURLStringKey=https://tsock.us1.twilio.com:443/v3/wsconnect, NSErrorFailingURLKey=https://tsock.us1.twilio.com:443/v3/wsconnect, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalWebSocketTask <724658EF-E3D3-4554-83C5-0975EE6C738C>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <724658EF-E3D3-4554-83C5-0975EE6C738C>.<1>, NSLocalizedDescription=The network connection was lost.}
Ideas on what I might be doing wrong? Is there some additional step to enable the client or to enable to app to communicate with that URL?
Thanks