且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在iphone模拟器上的wifi

更新时间:2021-12-11 00:36:45

禁用后网络连接,图标仍然显示为已启用,但连接当然已死。如果您正在使用Reachability类或仅尝试ping URL以验证连接,则模拟器将以与禁用Wifi的设备相同的方式响应,这使得在这些条件下在模拟器上进行的测试非常准确。

After disabling your network connection, the icon is still present showing it as enabled, but the connection is of course dead. If you are using the Reachability class or just attempting to ping a URL to verify a connection, the simulator will respond the same way a device with disabled Wifi would, which makes testing on the simulator under these conditions pretty accurate.