iPhone simulator cannot connect to internet
Asked Answered
N

10

30

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.

Nat answered 24/11, 2012 at 15:39 Comment(7)
reset the simulator settings..Behn
tried this many times, but I doesn't help either.Nat
then try by quitting xcode, simulator.. remove both from dock.. restart the machine den restart the xcode run any app.. then use this simulator..Behn
What effect could removing them from the dock after quitting possibly have?Scoop
I just closed and opened the simulator again. That worked for me!Ysabel
i restarted everything, mac , xcode and simulator. Then it starts working fineOralle
Check out your proxy settings as in one of the comments below.Usually
N
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.

Nat answered 7/4, 2015 at 12:6 Comment(0)
A
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

Abusive answered 23/9, 2014 at 10:59 Comment(4)
why does this work? and how come internet worked before and now is not working?Baggs
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.Pulsifer
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.Dominance
it took me a while until i figured i need to scroll a bit down to in order to see the the development menu 😅Bidle
U
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.

Unattached answered 28/4, 2016 at 12:6 Comment(2)
You just saved me a HUGE headache! Almost started pulling cords, formatting, re-installing etc.... Thank you!Pirandello
I use sophos antivirus, uninstall it and all start workingNormandnormandy
S
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.

Subscription answered 3/2, 2015 at 23:36 Comment(1)
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.Normandnormandy
N
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.

Nat answered 7/4, 2015 at 12:6 Comment(0)
G
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'

Granado answered 7/12, 2016 at 9:52 Comment(0)
S
2

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

Siret answered 12/3, 2015 at 11:13 Comment(0)
M
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.

Marlenmarlena answered 8/4, 2013 at 9:4 Comment(0)
G
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.

Grummet answered 25/9, 2015 at 19:55 Comment(0)
B
0

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.

Bedtime answered 14/12, 2023 at 0:8 Comment(0)
L
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).

Lowspirited answered 19/3 at 19:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.