Toggle network for iOS Simulator

Network fault-tolerant is important to asynchronous request. For iOS simulator can not toggle the network easily, because of its network ability is binding to its level. So that if you turn your host network off, then your iOS simulator network is also down. However, the host lost all network connection.

The firewall rule can help me do that smart, just block the site and port you would. You can use the below script:

You can change the host you want block in line 3 banHost.