Jun 16, 2011
Archive

Simulate cellular connections on Mac (for iOS simulator)

Oliver Drobnik, at Cocoanetics writes:

Now our trick creates a new IP firewall rule restricting the bandwidth to 112 kBits. You have to do this modification as root, hence the sudo and the first sudo will ask for your root password.

sudo ipfw add 500 pipe 1 ip from any to any
sudo ipfw pipe 1 config bw 112kbit/s plr 0 delay 20ms

Now you can test your app in simulator and enjoy the much faster turnaround when debugging the handling of slow connections.

To remove the firewall rule you use the following command:

sudo ipfw delete 500

I keep intending to make a note of these commands for future reference, every time I see them—this time I’ve done it.

Blog comments powered by Disqus

About
@adurdin is thinking aloud Subscribe via RSS.