I'm having issues with websocket Code=57

I’m working in Xcode and having issues with the integration to connect it. basically the logs look like these ones:
:cross_mark: Trading WebSocket error: Error Domain=NSPOSIXErrorDomain Code=57 “Socket is not connected” UserInfo={NSErrorFailingURLStringKey=https://demo.tradovateapi.com/v1/websocket, NSErrorFailingURLKey=https://demo.tradovateapi.com/v1/websocket}

:cross_mark: Market data WebSocket error: Error Domain=NSPOSIXErrorDomain Code=57 “Socket is not connected” UserInfo={NSErrorFailingURLStringKey=https://md-demo.tradovateapi.com/v1/websocket, NSErrorFailingURLKey=https://md-demo.tradovateapi.com/v1/websocket}

Basically URLSession is treating the WebSocket as HTTPS, not WSS.
idk why? Is it a MacOS issue? any help?

looks like the issue is the scheme websockets must use wss://, not https://.
URLSessionWebSocketTask will fail with code 57 if the URL isn’t explicitly ws:// or wss://.
try wss://demo.tradovateapi.com/v1/websocket and same for market data.
not a macos issue, usually just URL config / ATS settings.