Please, can you help me with running on Watch.
this code
let socket = WebSocket(url: URL(string: "ws://192.168.2.115:8088/")!)
socket.delegate = self
socket.connect()
recievie this error:
2017-10-29 23:43:32.179755+0100 WSWatch Extension[429:658375] refreshPreferences: HangTracerEnabled: 0
2017-10-29 23:43:32.180032+0100 WSWatch Extension[429:658375] refreshPreferences: HangTracerDuration: 2000
2017-10-29 23:43:32.180197+0100 WSWatch Extension[429:658375] refreshPreferences: ActivationLoggingEnabled: 0 ActivationLoggingTaskedOffByDA:0
2017-10-29 23:43:32.631505+0100 WSWatch Extension[429:658436] dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
2017-10-29 23:43:33.635235+0100 WSWatch Extension[429:658436] dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
2017-10-29 23:43:34.636544+0100 WSWatch Extension[429:658436] dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
2017-10-29 23:43:35.637684+0100 WSWatch Extension[429:658436] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:5 Err:-1 Errno:1 Operation not permitted
2017-10-29 23:43:35.638038+0100 WSWatch Extension[429:658436] [] nw_resolver_create_dns_service_locked DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563)
On Simultar work O.K.
Thank you
I don't specifically what you are seeing but those errors all look like DNS errors. I'm gonna guess your watch isn't able to find the server at the IP address you have in your code. I can't really help with troubleshooting environment related issues, but I would try double checking your watch extension is on WIFI to reach that internal IP. Best of luck.
I've had no luck getting this to work on an actual device either.
I've tried connecting to both a local WebSocket server, and a public one, but I keep getting the same error as bellow.
As above, it works fine in the simulator but no luck on the watch.
New project, nothing else running just:
let request = URLRequest(url: URL(string: "ws://echo.websocket.org")!)
request.timeoutInterval = 5
socket = WebSocket(request: request)
socket.delegate = self
socket.connect()
Error code:
2018-07-16 17:47:22.624384+1000 Watch Extension[310:158765] dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
2018-07-16 17:47:23.639598+1000 Watch Extension[310:158765] dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
2018-07-16 17:47:24.641709+1000 Watch Extension[310:158765] dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
2018-07-16 17:47:25.644958+1000 Watch Extension[310:158765] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:5 Err:-1 Errno:1 Operation not permitted
2018-07-16 17:47:25.645255+1000 Watch Extension[310:158765] [] nw_resolver_create_dns_service_locked DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563)
2018-07-16 17:47:25.647328+1000 Watch Extension[310:158765] [] nw_connection_get_connected_socket 4 Connection has no connected handler
2018-07-16 17:47:25.647466+1000 Watch Extension[310:158765] TCP Conn 0x17579d30 Failed : error 0:-65563 [-65563]
Websocket disconnected2: The operation couldn鈥檛 be completed. (kCFErrorDomainCFNetwork error -72000.)
Have you heard of anyone who has been able to get this library working on an actual watch or do you have any tips for doing so?
@daltoniam Also have this issue :/