“This is the 8th day of my participation in the Gwen Challenge in November. Check out the details: The Last Gwen Challenge in 2021”

The problem

We usually because of problems in the development will encounter a lot of data, we can also in the process of development, through the method of printing log data to monitor the problem, but if is online package, although also can through the way of xcode debugging, but some of the specific situation to the debugging, then caught the importance of withdrawal, Without debugging, you can see that the interaction with the server is data, and very detailed, header, cookie content and so on can be viewed to.

Then how to achieve our above purpose, let’s see how to operate

process

MAC installation

  1. Of course, download Charles software package first and install it

  2. When the installation is complete, open the software and install the Charles certificate on your computer

  1. After the certificate is installed, open the keychain to check whether the installation is successful, and then set the certificate to trust

After the trust is successful, you can grab THE HTTPS data from the browser on the computer. If you want to grab the HTTPS data from the mobile phone, you need several more operations.

The iPhone installed

  1. First, make sure the iPhone and MAC are on the same network.

  2. View the LAN IP address on the MAC, or do the following

  1. Manually set up the proxy, open the iPhone’S wifi Settings, find the current wifi connection, click the button on the right, and drop down to the bottom of the Configuration proxy

  2. Install the Charles certificate, open your browser and enter the CHLS. Pro/SSL shown above into your browser. Then follow the instructions to install the Charles certificate

  3. Certificate trust Settings. Settings – General – About local – Certificate trust Settings

After iOS10.3, you need to manually trust downloaded certificates

  1. Set SSL Proxying for Charles

Choose Charles from the menu: Proxy -> SSL Proxying Settings…

Then you can have a nice grab