Jakub Warchol

Jakub Warchol

Apr 18, 2016 - 

1 min read  - 

Intercept network traffic with mitmproxy in iOS Simulator

Ever had a problem debugging API calls?

Here is a great tool to help you with that (and probably a hundred of other things).

mitmproxy

You can peek under the hood of your app network traffic and find all those pesky bugs! Here is how to configure it for your iOS Simulator:

Firstly let’s install (this tutorial requires pip and python packages):

To make it work you need to inject mitmproxy’s CA certificate to our iOS simulators. To do that use ADVTrustStore tool:

Executing these commands should trigger a bunch of Y/n dialogues. You will be prompted to install CA certificate on every iOS Simulator on your OSx. Choose ‘Y’ everywhere. Congrats! You have just added the certificate to all of your simulators.

The last thing to do is to setup a proxy to let mitmproxy catch all the traffic. To do that go to your network preferences:

Select HTTP and/or HTTPS on the left, insert your IP address in the place of localhost, and set the port to 8080. Accept all the changes.

You should be good to go! Just run the mitmproxy in your terminal and enjoy the awesomeness!

Similar posts

Jeremi Kaczmarczyk

Jul 7, 2017 - 

6 min read  - 

Przemyslaw Stasiak

Jun 13, 2017 - 

2 min read  - 

Karolina Samorek

May 25, 2017 - 

3 min read  - 

We Build Products

Startups, Data Science / AI, Web Development, Mobile Development and Product Design.

Contact us