Charles Proxy for iOS development – simulating 3g

Charles Proxy is a great tool for web developers and it can help you in mobile apps too.

Here’s what you’d need to set it up:

  1. Run charles on your pc / mac, go to Proxy -> Proxy Settings and note the proxy port
  2. In your device network settings, enable http proxy and enter its ip and port (see below for ios)
  3. ┬áBack to charles, click on Proxy -> Throttling Settings and enable throttling while choosing the 3G Throttle Preset. In the example below i’ve created another preset where i’ve lowered the in/out bandwidth even further

That’s it – now go use your app and watch in the charles screen the requests.

For extra credits, you can introduce packet loss/reordering by running

tc qdisc change dev eth0 root netem delay 10ms reorder 25% 50%

in your box – see netem for more