1

iPhone Simulator can not open (localhost) http://127.0.0.1:8000/foo/bar/enter image description here

What is the reason?

andilabs
  • 22,159
  • 14
  • 114
  • 151
  • The problem was somewhere else. the endpoint /goto/ was redirecting (if iPhone) to iTunes store link, which even when copy and paste breaks on iPhone simulator. Just it. End of the story. – andilabs Apr 05 '14 at 15:17
  • use ngrok which really rocks... Check the below post https://stackoverflow.com/questions/52618330/android-emulator-not-connecting-to-localhost-api/52626534#52626534 – obaid Jul 02 '20 at 07:54

1 Answers1

11

The iOS Simulator uses the host machine network so you should be able to just use localhost or your machines IP address, whichever IP your web service is listening on.

So, try out this:

http://localhost:8000/your_path
Michal
  • 15,429
  • 10
  • 73
  • 104
etolstoy
  • 1,798
  • 21
  • 33