Created Debugging Https bugs using Charles (markdown)

Manuel de la Pena 2016-11-14 23:21:35 +01:00
Родитель c016b6bda8
Коммит e2f32e09af
1 изменённых файлов: 36 добавлений и 0 удалений

@ -0,0 +1,36 @@
(Charles)[https://www.charlesproxy.com] is a web debugging proxy that allows to
sniff the http communications with a remote server. Charles is a good tool to
use to be able to debug possible issues with the network stack, specially the
HttpClient and one of its implementations.
This document shows the few steps that have to be taken to be able to use Charles
for debugging https calls.
# Getting Started
# Download Charles
You can start using Charles with its trial license which will provide you with a copy of the application that limits the amount of time the application will run. Of course, if you do find the software we recommend you to get a license ;)
The application downloads can be found (here)[https://www.charlesproxy.com/download/]
# Installing the ssl proxy
Once the application has been installed, it is important to install the Charles
CA SSL certificate in the iOS Simulators in order to be able to use see the
encrypted communication.
As of version 3.9.3, Charles contains a menu item that allows the installation
of the certificate in all the simulators present in your system. This menu
item can be found in the Help menu under "Install Charles CA SSL Certificate in iOS Simulators"
which will do the installation for you.
# Development details
## HttpClient
There are several implementations of the HttpClient, each of them might need to be set to use the system proxy in order to be able to sniff the communication.
* **Managed:** Nothing needs to be done.
* **CFNetwork:** Make sure that the property UseSystemProxy in the CFNetworkHandler is set to be true.
* **NSUrlSession:** Nothing needs to be done.