Charles setup for IOS simulator
Charles is an HTTP proxy / HTTP monitor / Reverse Proxy that enables a developer to view all of the HTTP and SSL / HTTPS traffic between their machine and the Internet. This includes requests, responses and the HTTP headers (which contain the cookies and caching information).
Steps for setting up Charles on Mac to intercepting and decrypting network traffics from IOS simulators.
1. Download Charles and open it. https://www.charlesproxy.com/download/latest-release/, since Charles and IOS simulator both are running on the Mac using the same Wi-Fi, there is no need to configure the Wi-Fi connection settings as you would for real IOS devices such as iPhone.
2. In Charles, go to Help -> SSL Proxying -> select Install Charles Root Certificate in iOS Simulators.
3. Restart your ios simulator.
4. Make sure Charles is listening for traffic on your computer. In Charles, go to Proxy and make sure macOS Proxy is selected.
5. Make sure Charles is recording the traffics. In Charles, go to Proxy and select Start Recording if it is is not yet started.
6. On your ios simulator, open an app such as Safari, and then do some browsing, all of the should show up in Charles.
7. Back to the Charles, enable SSL proxying to view traffic with decrypted data. If you want to see traffics from https://api.example.com/, right click on this network request and click the Enable SSL Proxying option.
References:
https://www.charlesproxy.com/documentation/using-charles/ssl-certificates/
Search within Codexpedia
Search the entire web