One of the tools I couldn't do without is an open source project called mitmproxy.
It's easy to setup, and lets you use your laptop as a proxy between a mobile application and the internet. You can then analyse all of the network requests being made, including the contents, payload size, and latency. All of this knowledge is golden when working on app performance.
Here are some examples of improvements I've made to apps as a result of using mitmproxy:
It's particularly useful when inheritting a messy, legacy app, where the networking behaviour might be difficult to follow. Mitmproxy lets you quickly get a handle on what the app is actually up to.
Mitmproxy is written in Python, and uses modern features like asyncio. This makes it particularly appealing to me.
# Install brew install mitmproxy # Then run the proxy with the web interface. # The proxy usually run on port 8080, and the web interface on 8081. mitmweb
On an iOS device:
Don't forget to keep your laptop awake! If it goes to sleep your iOS app won't have internet access. It sounds obvious, but don't let this happen during a demo 😉
The perfect companion to mitmproxy on iOS is the Network Link Conditioner. This lets you simulate poor network performance on an iOS device, and lets you test that the improvements you're making are resulting in a superior user experience.
To set this up, just go to your settings on your iOS device, and Developer > Network Link Conditioner. I usually keep it set to 3G.