是否可以在iOS模拟器中禁用网络? [英] Is it possible to disable the network in iOS Simulator?

查看:187
本文介绍了是否可以在iOS模拟器中禁用网络?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试调试在互联网上获取主要数据的应用程序中看到的一些不一致的行为。我没有在模拟器中看到问题,只是在设备上,所以我想在模拟器中重现网络和连接环境。

I am trying to debug some inconsistent behaviour I am seeing in an application that gets its primary data from the internet. I don't see the issues in the simulator, just on the device, so I'd like to reproduce the network and connectivity environment in the simulator.

有没有在模拟器中禁用网络的方法?

Is there any way of disabling the network in the simulator?

(我正在将Mac远程连接到代码,现在没有其他选择,因此禁用OS网络不是选项)。

(I am connecting to the Mac remotely to code, no other choice right now, so disabling the OS network isn't an option).

推荐答案

恐怕不是 - 模拟器共享操作系统正在使用的任何网络连接。我提交了关于模拟网络状况的雷达错误报告;你可能会考虑这样做。

I'm afraid not—the simulator shares whatever network connection the OS is using. I filed a Radar bug report about simulating network conditions a while back; you might consider doing the same.

这篇关于是否可以在iOS模拟器中禁用网络?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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