-
Notifications
You must be signed in to change notification settings - Fork 2
Constructor's SDK and Charles
Jimmy Li edited this page Mar 29, 2021
·
7 revisions
Constructor's SDK communicates with Constructor's servers using HTTPS requests. This tutorial will allow you to spy on requests and responses to validate that tracking events and requests for results work as expected.
Your computer and your test device will need to be on the same WiFi network for this to work. We will be proxying traffic from your device to Constructor's servers through your computer so that we can view the requests and responses in plain text.
Make sure that you are connected to whatever VPN you need to be connected to in order to access other domains outside of Constructor i.e (http://staging.yourdomain.com)
- Install Charles proxy from https://www.charlesproxy.com/
- Start Charles proxy
- Enable SSL proxying for *.cnstrc.com
- Option + click on the WiFi symbol on macOS to get your local IP Address (192.168.x.x)
- Go to Proxy / Proxy Settings > to discover the port to connect your device to (8888)
- Go to your WiFi settings and select your current WiFi network to configure your proxy settings
- Edit your proxy settings from None to Manual
- Set your proxy server to your local IP Address
- Set your proxy port to the port Running Charles
- In Charles, allow the incoming connection from your iPhone Device
- Using Safari, visit http://chls.pro/ssl and download the SSL certificate from Charles and install it
- If you are on iOS 10.3 or later, open the Settings.app and navigate to General > About > Certificate Trust Settings, and find the Charles Proxy certificate, and switch it on to enable full trust for it
- Clear existing traffic
- Toggle to sequence instead of structure
- Filter traffic on cnstrc.com
- Snoop on HTTPS traffic
- Trigger events/requests within the app
- Make sure that you can see both requests and responses (responses will be in plain text if the SSL certificate installed correctly)
- Remove the proxy setting on your device