无法在iOS 8模拟器中使用HTTP [英] Can't use HTTP in iOS 8 simulator

查看:177
本文介绍了无法在iOS 8模拟器中使用HTTP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MacBook Pro上安装了xcode 6,beta 7。当我尝试使用运行iOS 8的iOS模拟器,并尝试连接到任何不使用HTTPS的站点时,我得到一个空白页面,指出Safari无法打开页面因为网络连接丢失在模拟器中。任何使用HTTPS的页面都可以正常工作。

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.

我已经为这样的问题尝试了各种解决方案,但没有一个能够奏效。这些不同的解决方案包括重新启动Mac,卸载xcode 6并重新安装它,以及这两个链接中提出的所有解决方案:

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:

无法在模拟器中运行应用程序:Xcode beta 6 iOS 8

无法在模拟器中运行应用程序:Xcode beta 6 iOS 8

推荐答案

我刚刚从一个Apple员工关于Apple论坛中的问题:

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.

重新启动模拟器确实让我的问题消失了一段时间,但它看起来我需要在Mac改变wifi网络或唤醒时重启我的模拟器。希望他们很快就会发布一个修复程序,这样就无法进行测试。
https://devforums.apple.com/message/1048174#1048174

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

这篇关于无法在iOS 8模拟器中使用HTTP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆