b2cloud

10th September 2014

Rerouting an iPhone’s HTTP and HTTPS traffic (Part 3)

Guides | Tutorial By 2 years ago

Over 2 years ago I posted a couple of blogs showing how to monitor iPhone HTTP and HTTPS traffic. If you haven’t seen these two blogs, it’s recommended you read them for some initial setup before continuing.
Part 1
Part 2

This was demonstrated using a tool called Charles. What I showed was pretty basic, Charles can actually do a lot more than this.

Recently one of our clients wanted a build of one of our apps connected to their debug server so they could test some API changes. Instead of changing url strings in the code, recompiling, provisioning and code signing, you can simply take the existing app and hook it up to Charles in order to reroute all traffic from your production url to your development url.

To do this, first connect your iPhone through Charles (as demonstrated in Part 1).

Now through the Tools menu, select “Map Remote…”

thumbnail

A window will appear, fill in your map from and map to criteria. Any fields you don’t fill in will act as a wildcard, in the example below all HTTP path/GET parameters will be routed from the live server to the dev server.

thumbnail-1

That’s it. Now whenever a request from the client app tries to access the live server, Charles stops it and instead forwards it to your dev server.

You can also choose “Map Local…” through the Tools menu and map a url to a file on your computer.

Recommended Posts

Monitoring an iPhone’s HTTPS traffic (Part 2)

Post by 2 years ago

Following on from last week's blog, this will cover monitoring an iPhone's HTTPS traffic. If you haven't already, look at the setup from last week as it is required in order for this next part...

Got an idea?

We help entrepreneurs, organizations and established brands from around
the country bring ideas to life. We would love to hear from you!