Connect Device to Mac localhost Server?
Have your server listen on 0.0.0.0
instead of localhost
.
I had the same problem. I turned off my WI-FI on my Mac and then turned it on again, which solved the problem. Click Settings > Turn WI-FI Off.
I tested it by going to Safari on my iPhone and entering my host name or IP address. For example:
http://<name>.local
or http://10.0.1.5