23

Just installed XCode 6 Beta to test my app. The iOS 8 Simulator runs and my app successfully installs but the simulator can't access the internet. I try using safari or maps and there is no network connection. If I run the iOS 7 simulator from XCode 6, it connects to the internet perfectly.

I've tried using the steps in this thread but it didn't change anything. (The steps were more if your app doesn't install but I tried anyway.)

I don't have a firewall or little snitch blocking the simulator.

Any other pointers?

Maps doesn't connect to the internet safari no connection

Community
  • 1
  • 1
mogile_oli
  • 2,148
  • 2
  • 21
  • 21
  • This was already answered here: http://stackoverflow.com/questions/25654679/cant-use-http-in-ios-8-simulator – aeu Oct 09 '14 at 04:42
  • @aeu Turning WiFi on (and off again) worked for me like posted in [this](http://stackoverflow.com/a/25993357/2471006) answer. – anneblue Dec 01 '15 at 10:01

10 Answers10

18

I had the same problem. Try to quit the iOS simulator, and then re-build and launch your application. It should work.

thinkkevin
  • 191
  • 2
  • 4
17

I saw a lot of posts about re-starting the simulator, resetting the simulator settings, etc. I ended up re-installing X-Code, updating to X-Code 6.1, etc, etc. Still didn't have a connection to the network!

What ended up being the solution is I turned off my antivirus (TrendMicro). I had checked all the anti-virus settings before and didn't see any "block process connection". When I turned the whole thing off it solved the problem though.

mogile_oli
  • 2,148
  • 2
  • 21
  • 21
5

I had same error with xCode 6.1 and iOS 8 simulator. What worked for me is I went to settings>developer> and switch on "Allow HTTP Services" option.

Sahan Maldeniya
  • 1,028
  • 1
  • 14
  • 21
  • 3
    Errr, where ? On my iOS 8.1 Simulator, I have a Developer item in Settings, but there's no "Allow HTTP Services" option. I can connect to any external web sites, but not my intranet site. My MacBook can see these sites, but the Simulator (my app, or Safari) can't. It was all working fine until I upgraded to the latest XCode/Simulator... – Mike Gledhill Nov 18 '14 at 10:31
  • As far as I can tell, that option only refers to PassKit. – Simon Dec 04 '14 at 15:40
5

Same problem for avast security on mac, turning of webshield under avast preferences solved it.

Xcode version 7.3.1, ios simulator 8.4

jorrebor
  • 2,166
  • 12
  • 48
  • 74
3

Turning off AVAST resolve all errors.

Dmitrii Cooler
  • 4,032
  • 1
  • 22
  • 21
2

I've had the exact same issue. It's bizare but plugging my Macbook in via an ethernet cable seemed to resolve this. I know it's not perfect but it works.

Alec.
  • 5,371
  • 5
  • 34
  • 69
  • Thanks Telexx. Unfortunately I have a MacBook Pro with retina that doesn't have an Ethernet port... – mogile_oli Aug 05 '14 at 15:12
  • Good ol' apple eh? Try forgetting the connection and connecting again. – Alec. Aug 06 '14 at 09:21
  • I'm also experiencing this issue on an iMac, even after the full release of Xcode 6. Did the ethernet issue require a system restart or other steps? It's weird, I have both iOS7 and iOS8 iPhone 5s simulators up, 1 able to load apple.com and 1 not. Google works fine surprisingly... – TahoeWolverine Sep 23 '14 at 00:45
  • Hi Tahoe? Are you still running the beta version as I believe a full release of this is out now? – Alec. Sep 23 '14 at 09:19
  • I still haven't resolved this after installing XCode 6.0.1 and even with 6.1 Seed. I also tried to delete and re-add the simulators. No change. – mogile_oli Oct 03 '14 at 15:18
1

I also use XCode 6.1 GM and git the same issue. My scenario was that during development I connected my MacBook to another WLAN. My Macbook was connected to the internet, but the iOS Simulator not. My solution was to just close the iOS simulator and redeploy the app from xcode.

i89
  • 1,092
  • 8
  • 11
0

Just simply reset the simulator. Quit and Re-run your app your problem will be gone. It works for me.

Jemythehigh
  • 583
  • 5
  • 12
0

I had a similar scenario with Mac OS X 10.9.5, Xcode 6.2, Cordova 4.3, iOS 8.3 - Everything worked fine on all platforms except ajax/network access was limited on the IOS simulator.

As suggested by by others, going into the Settings on the IOS emulator and changing "Allow HTTP Services" in the developer submenu opened up all network access and ajax queries/processes came to life.

So try that first!

HaveNoDisplayName
  • 8,291
  • 106
  • 37
  • 47
mbsquid
  • 52
  • 1
  • 6
0

The source control I used is Git. So upon resetting all my local changes and getting the latest solved my problem.

So First thing I would do is Stash all your local changes if you need them. Then reset all your local changes and get the latest Now run the tests.

This worked for me. Hopefully works for you as well.

swathy valluri
  • 5,039
  • 2
  • 16
  • 13