Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't use HTTP in iOS 8 simulator

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

like image 484
BobDave Avatar asked Sep 03 '14 22:09

BobDave


People also ask

Do I need Xcode for iOS simulator?

Launching the Simulator, though, always requires opening Xcode and going to Developer Tools. Because the Simulator. app is embedded within the Xcode app bundle, apps like LaunchBar won't find it to index it.

How do I change the region in iOS simulator?

in iOS Simulator menu, go to Debug -> Location -> Custom Location. There you can set the latitude and longitude and test the app accordingly.

Can you run an IPA file on a simulator?

Just like an APK (Android Application Package) file can be installed on Android devices, an IPA file can be used for testing iOS applications. You can even push it to the app stores to publish your app. You can think of an IPA file like a simple ZIP file.

How do I use network conditioner in iOS simulator?

Simulate Poor Network on iPhoneOpen the Settings app and navigate to the Developer option. Select the Network Link Conditioner under NETWORKING option. Now enable the Network Link Conditioner & choose the network profile you want, and start testing how your app works in different conditions.


2 Answers

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

like image 122
Bek Avatar answered Oct 04 '22 20:10

Bek


Downgrading to iOS Simulator 7.x works too.

like image 42
StevenDavisPhoto Avatar answered Oct 04 '22 18:10

StevenDavisPhoto