1

Can I connect to a WebSocket server in 2021 using WatchOS and StarScream on a real device?

I found information that it is impossible to connect on a real device, but the information is old

Unfortunately, I can not check on a real device, but it works on a simulator!

1 Answers1

1

You can connect to a websocket server with StarScream on real devices. The issue you mentioned is fixed.

But be aware, your watch should be connected with your paired iPhone which has active internet connection. Otherwise, your socket connection won't connect.

TuracBey
  • 232
  • 2
  • 10
  • Thanks If I'm not connected to my phone but connected to my home Wi-Fi directly, won't I be able to connect to the socket? – Артем Хрещенюк Mar 07 '21 at 14:39
  • low-level socket API works on watchOS only for audio streaming, so if you have audiostreaming app you will be able to connect to socket server, I suggest you to do some research for it. But othwerwise you won't be able to connect over wifi and lte because of low level Networking API limitations and you have to have paired iPhone. – TuracBey Mar 07 '21 at 19:44