Using Proxyman to Debug an iOS App

I’ve always enjoyed debugging, even when it involves applications I didn’t develop myself. When you want to understand how a third-party app works, or provide useful information to the people who can fix a bug, you need to find a way to see what is happening under the hood. It is often a matter of understanding application architecture and finding the right tool for the job.

A WooCommerce iOS Story

I recently encountered a small bug while managing a WooCommerce store via the iOS app. I noticed that something wasn’t working correctly, and I wanted to know why.

I knew the WooCommerce mobile app used REST APIs to communicate with the backend. I also knew the bug was specific to the iPhone app because the same action worked perfectly on the website’s front end. This narrowed the problem down because I knew where to look.

Enter Proxyman

To get a better understanding of what was happening, I used Proxyman. Proxyman is a high-performance proxy that you can install on your Mac or iPhone to inspect network traffic.

If the bug had been on my Mac, I might have instinctively reached to Wireshark to debug the API calls. However, since the issue was happening on iOS, I needed something else.

HTTPS is wondeful, until you want to see the payloads

Since almost everything now runs on HTTPS, you can’t simply look at the payload because it is encrypted. To get around this, you can use Proxyman to install a certificate on the device. This allows the tool to act as a “man-in-the-middle,” capturing and decrypting the traffic on your iPhone.

You have to be mindful of how and when you use this for (obvious, I’d say) security reasons, but it is incredibly helpful for this kind of troubleshooting because you can look at exactly the data that you want and inspect the REST payloads.

I was eventually able to see the exact JSON payload being passed back and forth and quickly spotted a difference in the way the data was being passed, which was causing the bug.

Which, in turn, reminded me of how rarely things are fully outside of our understanding and reach and are often within our real of possibilities.
If there’s something I always take back home from these experiences is that most of what we think is possible. Failure is often hidden behind giving up.


Discover more from Give me the chills

Subscribe to get the latest posts sent to your email.

Comments

Leave a comment

Discover more from Give me the chills

Subscribe now to keep reading and get access to the full archive.

Continue reading