热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

无法在ios8模拟器中使用HTTP-Can'tuseHTTPiniOS8simulator

Ihaveinstalledxcode6,beta7onaMacBookPro.WhenItrytousetheiOSsimulatorrunningiOS8

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.

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

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:

我尝试过各种各样的方法来解决类似的问题,但是没有一种是有效的。这些不同的解决方案包括重新启动Mac,卸载xcode 6并重新安装它,以及这两个链接中提出的所有解决方案:

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

无法在模拟器中运行app: Xcode beta 6 ios8

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

无法在模拟器中运行app: Xcode beta 6 ios8

2 个解决方案

#1


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

重启模拟器确实让我的问题消失了一段时间,但看起来我需要在Mac改变wifi网络或醒来时重新启动模拟器。希望他们能尽快发布一个补丁,这样就不可能进行测试。https://devforums.apple.com/message/1048174 # 1048174

#2


3  

Downgrading to iOS Simulator 7.x works too.

降级为iOS模拟器7。x的作品。


推荐阅读
author-avatar
丶Le丨囧囧_832
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有