31

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.

7
  • 8
    reset the simulator settings.. Commented Nov 24, 2012 at 15:40
  • tried this many times, but I doesn't help either. Commented Nov 24, 2012 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.. Commented Nov 24, 2012 at 16:10
  • 2
    What effect could removing them from the dock after quitting possibly have? Commented Nov 24, 2012 at 16:26
  • I just closed and opened the simulator again. That worked for me! Commented Sep 23, 2014 at 22:56

10 Answers 10

53

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.

screenshot

Sign up to request clarification or add additional context in comments.

4 Comments

why does this work? and how come internet worked before and now is not working?
I'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.
Thanks 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.
it took me a while until i figured i need to scroll a bit down to in order to see the the development menu 😅
20

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.

2 Comments

You just saved me a HUGE headache! Almost started pulling cords, formatting, re-installing etc.... Thank you!
I use sophos antivirus, uninstall it and all start working
9

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.

1 Comment

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.
5

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.

Comments

5

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'

Comments

2

I changed my dns settings and I set it to google dns then it worked. Hopefully it works for you too.

Comments

1

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.

Comments

1

Had the same problem on XCode 15. It appeared that simulator doesn't connect to 5G WiFi network. After switching to regular WiFi - the problem was gone.

Comments

0

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.

Comments

0

I had the same problem after installing Cisco AnyConnect VPN. To fix it, I had to uninstall AnyConnect and then go into "System Settings"->"Network"->"Filters" and disable "Cisco AnyConnect Socket Filter" (Type DNS Proxy).

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.