I'm using Xcode 4.5, my iPhone simulator is unable to connect to internet. Internet is working on all my Mac Browsers, but iPhone simulator is unable to connect. I tried opening a web page in Safari in iPhone simulator, but doesn't help.
-
8reset the simulator settings.. – vishy Nov 24 '12 at 15:40
-
tried this many times, but I doesn't help either. – Afnan Nov 24 '12 at 15:43
-
then try by quitting xcode, simulator.. remove both from dock.. restart the machine den restart the xcode run any app.. then use this simulator.. – vishy Nov 24 '12 at 16:10
-
2What effect could removing them from the dock after quitting possibly have? – jonmorgan Nov 24 '12 at 16:26
-
I just closed and opened the simulator again. That worked for me! – Chris Nolet Sep 23 '14 at 22:56
-
i restarted everything, mac , xcode and simulator. Then it starts working fine – krishan kumar Apr 01 '19 at 13:24
-
Check out your proxy settings as in one of the comments below. – Valentin Seehausen Jun 07 '21 at 20:39
8 Answers
1.Turn off lan connection;
2.Turn on wifi;
3.In the iOS Simulator > Settings > Developer > Allow HTTP Services (turn on);
4.Restart Xcode and simulator.

- 29,669
- 15
- 106
- 125

- 1,122
- 8
- 14
-
why does this work? and how come internet worked before and now is not working? – Esqarrouth Feb 13 '15 at 14:12
-
1I'm having similar issues in Xcode Version 7.2.1 / Simulator Version 9.2 - I'm getting a Network Error `Network request failed` I've tried the above and it didn't help me. – Agent Zebra Aug 10 '16 at 00:58
-
1Thanks for this, although I'd like to suggest that you make your instructions a bit more detailed - for users who have never touched a Mac or an iPhone until a few weeks ago things are not so obvious. The screen shot is nice, except that I don't recognize the menu bar at the top - is that an older version of OS X or is it a simulated iPad? I assume steps 1 and 2 are for the OS X Preferences. It took me a long time to realize that step 3 involved the Settings app inside the simulated iPhone. Still, thanks again. – RenniePet Mar 05 '17 at 08:10
-
1it took me a while until i figured i need to scroll a bit down to in order to see the the development menu – gor May 10 '20 at 12:00
I had the same problem with Xcode 6.2 and iOS 8.2 Simulator. The response field was nil. I tried reseting the simulator, cleaning the product in Xcode, restarting both, restarting the Computer, turning wifi off and on and changing for a different wifi network. Nothing worked. Finally I disabled the Avast Antivirus Shields and it worked.

- 431
- 4
- 8
-
3You just saved me a HUGE headache! Almost started pulling cords, formatting, re-installing etc.... Thank you! – Greg Ellis Feb 15 '17 at 21:55
-
iOS Simulator (menu, top left) > Reset Content and Settings... fixed it for me. Note this will delete all the apps and associated data you have on the simulator.

- 9,289
- 12
- 69
- 108
-
This work for me, i also remove DNS at System preference, reboot my router/modem, computer after i done reset content and settings for the ios simulator. – nick Jun 17 '21 at 07:27
I'd this problem many times. Turns out I'd added proxy settings added in Network Preferences for my home network but office network didn't use any proxy. That happen to effect only iPhone Simulator but browsers worked fine with it.

- 888
- 1
- 13
- 37
I had this problem in xCode8.0. I solved by disabled my proxy go to
System Preference->Network->Advanced(Button)->Select 'Proxies' tab-> Under 'Select the protocol to configure:' disable 'Auto Proxy discovery'

- 4,390
- 4
- 22
- 30
I changed my dns settings and I set it to google dns then it worked. Hopefully it works for you too.

- 55
- 6
I've had this issue (also for the App Store), the way I solved it is going to Network Preferences, on the left you delete the current connected connection (-) and add (+) it again.

- 1,162
- 8
- 20
I was seeing a problem with the same symptoms, running iPhone 6s from the Simulator in OSX Yosemite. Check your version of Xcode. Upgrading from version 6 to 7.0 solved the network issue I was encountering.

- 1,504
- 13
- 20