can i disable wifi in iphone simultaor to test my app? I disconnect pc fro开发者_如何转开发m network, but the icon of wifi on iphone simulator is always on.
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.
精彩评论