ssg
ssg

Reputation: 83

Web socket fails on iOS

My code attempts to create a websocket connection.

It works on Windows, Mac and Ubuntu and on Safari, Firefox, Chrome and Edge.

It does not work on iOS (iPhone and iPad) and I have tested this failure on Safari and Chrome only. I guess it may not work for other browsers on iOS too.

I get the following error on iPad:

error: Websocket connection to 'wss://XXXX' failed: The operation could not be completed. (kNWErrorDomainPOSIX error 14 - Bad address).

On iPhone it gives a slightly different error:

error: Websocket connection to 'wss://XXXX' failed: The operation could not be completed. kNWErrorDomainPOSIX error 100 - Protocol error.

Where XXXX is a valid network address (domain name / remote IP / local network IP).

Upvotes: 2

Views: 2517

Answers (1)

paradox codee
paradox codee

Reputation: 26

Try entering a servers local ip address http://192.168.xx.xx:PORT and make sure both devices are on same local network

Upvotes: 1

Related Questions