How to inspect network traffic from iOS 15 Simulator with Proxyman
Have you ever experienced any issues while working with API calls, when no errors being shown on Xcode, but still there's no data displayed in your app? Have you ever wanted to inspect network calls to debug your application? In this tutorial, we'll see how to use Proxyman as a man-in-the-middle proxy to capture and inspect network traffic on your iOS Simulator(s).
- Download and setup the latest version of Proxyman
- Use Xcode 11.4+ on your Mac
This tutorial use Alamofire as an example application for debugging. You can find the source code here.
As soon as you download and install Proxyman successfully, network traffic would show up immediately on the Proxyman window.
Although both Proxyman and the sample project running, we're unable to see the traffic coming at the moment. Let's install Proxyman Certificate on your Simulator!
Install Certificate on iOS Simulator
On the Tab bar menu, select Certificate -> Install Certificate on iOS -> Simulators.
Install and Trust Proxyman Certificate on iOS Simulators
Proxyman provides a Setup Guide to help you simplify all the manual work. Click Install and Trust from the setup window and it will automatically configure the Certificate for you.
Reboot iOS Simulators
Then you'll need to reboot the Simulator. Simply click Reboot ... and you're now ready to capture the network traffic from your iOS Simulator.
Inspect the network traffic
Once you install the Certificate and reboot the Simulator, you can re-run the application and make an API call. Proxyman will capture and display the content of requests/ responses for your debugging.
SOME TIPS & NOTES
Proxyman can dectect how many Simulators are running
It's worth mentioning that Proxyman can auto-detect and let you know how many Simulators are running. Thus, if you haven't started your application or stop running it, the window would appear like this:
In case you have 2 Simulators running at the same time, Proxyman can tell you also:
What if I am unable to see traffic from my iOS Simulator?
In case you get any SSL errors or unable to see HTTP/HTTPs requests on iOS Simulators, check out the Troubleshooting section on Proxyman documentation to see if the issue can be resolved. If it doesn't not work also, don't hesitate to write us an email and we'd love to help you out.
While working with network calls can be tricky and frustrating sometimes, debugging them should now be a breeze for you. Proxyman, or other mitm proxy tools, can help you to capture and inspect HTTP/HTTPS traffic frrom your iOS Simulator. If you feel up for this tutorial and decide to become a netwoking wizard, check out our series about Proxyman advanced features such as Map Local, Breakpoint, or Scripting tool. They could help you modify HTTP/HTTPs requests/responses.
We hoped you enjoyed this tutorial. Happy debugging! 👨🏻🚀