Is it possible to disable the network in iOS Simulator?

Paul Hammond picture Paul Hammond · Jan 26, 2011 · Viewed 230.4k times · Source

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?

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

Answer

progrmr picture progrmr · Dec 12, 2012

Use a simple Faraday cage to block or limit the external RF signal level.

You can make your own with aluminum foil. The openings should be smaller than the wavelength of your data service if that's what you want to block.

800 Mhz has a 37 cm (14") wavelength, 1900 Mhz has a 16 cm (6") wavelength.

This works better with an actual device than with the simulator since the Mac is hard to work on when inside the Faraday cage ;-)

enter image description here