33

I have installed xcode 6, beta 7 on a MacBook Pro. When I try to use the iOS simulator running iOS 8, and try to connect to any site that is not using HTTPS, I get a blank page stating that "Safari cannot open the page because the network connection was lost" in the simulator. Any page that uses HTTPS works fine.

I have tried various solutions for problems like this, but none of them have worked. These various solutions include restarting the Mac, uninstalling xcode 6 and reinstalling it, and all the proposed solutions in these 2 links:

Unable to run app in Simulator : Xcode beta 6 iOS 8

Unable to run app in Simulator : Xcode beta 6 iOS 8

Community
  • 1
  • 1
BobDave
  • 349
  • 1
  • 3
  • 5
  • same, can't seem to find anything on this. – CaRDiaK Sep 18 '14 at 08:45
  • I've seen the same issue. I have noticed that some Apple websites (eg. the iCloud one) are accessible via Safari in the simulator even when others are not. – Iain McManus Sep 23 '14 at 06:56
  • Any word? I'm also seeing this in the iOS 8 simulator, but when I run the exact same build on the iOS 7 simulator, everything is fine. I'm filing a radar, have you yet? – Bek Sep 28 '14 at 13:16
  • I think that this answer can help : http://stackoverflow.com/questions/13542706/iphone-simulator-cannot-connect-to-internet/36914171#36914171 – AlbertoC May 15 '16 at 13:17

2 Answers2

32

I just ran across this response from an Apple employee regarding the issue in the Apple forums:

There is a known issue whereby changes in the host's network configuration (changing wireless networks, changing from wireless to wired, etc) will result in the simulated runtime appearing to loose network connectivity for some cases. The workaround is to just reboot the simulated device.

Restarting the simulator did make my issue go away for some amount of time, but it looks like I need to reboot my simulator any time the Mac changes wifi networks or wakes up. Hopefully they'll release a fix soon, it makes testing impossible. https://devforums.apple.com/message/1048174#1048174

Bek
  • 2,206
  • 20
  • 35
  • For me, turning WiFi on (and off again) worked like posted in [this](http://stackoverflow.com/a/25993357/2471006) answer. – anneblue Dec 01 '15 at 10:03
3

Downgrading to iOS Simulator 7.x works too.

StevenDavisPhoto
  • 160
  • 1
  • 12