Afnan
Afnan

Reputation: 898

iPhone simulator cannot connect to internet

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.

Upvotes: 31

Views: 62624

Answers (10)

Mark Foster
Mark Foster

Reputation: 484

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

Upvotes: 0

Artur Musin
Artur Musin

Reputation: 21

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.

Upvotes: 0

Stanislav Ostapenko
Stanislav Ostapenko

Reputation: 1122

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

Upvotes: 53

SaRaVaNaN DM
SaRaVaNaN DM

Reputation: 4410

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'

Upvotes: 5

AlbertoC
AlbertoC

Reputation: 441

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.

Upvotes: 20

Alex Johnson
Alex Johnson

Reputation: 1574

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.

Upvotes: 0

Afnan
Afnan

Reputation: 898

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.

Upvotes: 5

yasin.ce
yasin.ce

Reputation: 55

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

Upvotes: 2

shim
shim

Reputation: 10126

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.

Upvotes: 9

ggfela
ggfela

Reputation: 1152

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.

Upvotes: 1

Related Questions