3

I can not open static HTML pages served from a HTTP server run on my MacBook in iPhone 6s iOS 9.2, neither in 'Safari' nor in 'Chrome' browser when using: http://ipNumberOfMyServer:portNumber

I am able to open the pages on Android phones and I'm also able to open the pages if I turn MacBook's WiFi off and on, but if I change the page and refresh the browser, it again fails to load the page and says that server has stopped responding or that Safari could not connect to the server.

Resetting network settings in iPhone didn't help, nor did turning off Cellular Data in iPhone settings. Any idea what's wrong?

smohadjer
  • 801
  • 1
  • 9
  • 24
  • check your NSTransportSecurity setting in plist: http://stackoverflow.com/questions/31216758/how-can-i-add-nsapptransportsecurity-to-my-info-plist-file – Surely Feb 19 '16 at 13:46
  • This is an static HTML page, not an app. Apple developer site says that an info.plist file is required for bundled executables, so I don't think your comment applies to my case. – smohadjer Feb 21 '16 at 08:43
  • sorry, I think you are connecting from a webview. If it cannot be opened in browser also, you need to check your macbook's ip address and whether your phone are in the same network with your macbook. You can also try to open the page in your macbook to check if the server works well. – Surely Feb 21 '16 at 09:59
  • Server should work well since both on the Macbook and from an Android phone I can reach the server and open the page in a browser. – smohadjer Feb 21 '16 at 12:09
  • What was the solution? I'm having a similar problem here and would love your help: https://apple.stackexchange.com/q/284762/53510 – Ryan May 25 '17 at 04:53

2 Answers2

4

I know this is old already. You can get you computer name from System Preferences -> Sharing

System Preferences->Sharing

in your iPhone safari, type http://JimbasMekbuk.local if you using different port, say 3000, then add :3000 make sure you turn off firewall

I hope this will help :-)

jimbas
  • 41
  • 3
2

I had a similar problem, I changed the Wi-Fi network from 5GHz to 2.4GHz and this fixed it.

4b0
  • 21,981
  • 30
  • 95
  • 142
treebeard
  • 21
  • 1