How do I use Charles Proxy for mobile app testing?
I have been researching the usage of Charles Proxy.
And was wondering how to use it for testing mobile apps. In desktop apps you have option "Inspect via HTTP", however this doesn't work for the mobile app on the emulator since I need to get specific IP address instead of 127.0.
So my question is there a way to configure the Proxy settings on android emulator? In the emulator go to Setting > About > System Image > select the target. In emulator go to Settings > Wireless & network settings > proxy and turn the toggle. After doing this connect your phone by wifi and try to test. In Windows if I remember correctly, right-click your emulator and select "Run command line with emulator selected". Then you should be able to connect with adb over wlan0 using adb connect localhost:8081. As long as you set the proxy in the WLAN and not LAN section of your settings, this should work. Also, if you are running Windows 8 (or greater), you can configure Charles to work with your emulator - as long as your app connects over HTTPS (and not Http) the proxy will work correctly.
How to connect mobile device to Charles proxy?
I need to connect my mobile device to the Charles proxy that I can control it from my MacBook.
I use my iPhone for testing applications with the XCode debugger. So if I can connect it to a wifi hotspot from my iPhone or something I can be also able to use it as an interface to the Charles proxy on my Mac.
Does anyone knows how this is possible? Charles Proxy allows you to connect a second device and use it as a remote debugger for debugging your device on-the-go, via a Wi-Fi connection. See the instructions at Basically, when your iPad is connected to the Wi-Fi, Charles is launched on your Mac and listens on the default Mac port of 8888. It will show up as an additional device in your Mac's Wi-Fi config as soon as it launches.
How to use Charles proxy on iOS device?
When using Charles Proxy as a proxy server to capture traffic on your computer, it's always a pain to manage the proxy configuration via a web browser on your laptop.
On iOS devices, since iOS itself doesn't support proxy settings in OS X, we will try to set it up with X-Forwarded-Proto set to https and X-Real-IP set to true. If you are using a macOS Sierra, you will need to manually install Charles Proxier to get this feature available. Then you can use the following steps to set the configuration for your proxy server: Step 1: Open the Settings app and then tap on your name. Step 2: Scroll down and tap on your name at the bottom of the list and enter into Advanced (see below) if not already enabled. Step 3: Tap Proxy Server Settings as shown below. Step 4: Enter your desired proxy settings then tap OK. If the changes haven't been reflected immediately, you can also repeat the settings by tapping Reset Settings from the Advanced menu. Now try connecting to Google or some other site over HTTPS, if your iOS device isn't working, try turning off Wi-Fi and turn it on again and also try restarting your iPhone or iPad. If your WiFi still works fine without any change, here are a few troubleshooting steps that you can try: Try clearing the device cache and data from the Home screen. Press the home button twice and tap Clear All.
Open the Settings app and navigate to General > Reset All Settings. Restart the device. You can do this on the home button slide to power off the device then wait for 30 seconds and slide to power on again.
Connect your device to your computer and then restart your proxy server. Are there any other things that you have found to be helpful? Let us know.
Related Answers
Is Charles Proxy free?
I'm curious about what folks here use to monitor requests for...
How to connect mobile device to Charles Proxy?
Charles Proxy is a web debugging and traffic monitoring tool which hel...
How do I remove Charles Proxy certificate?
I've been using Charles Proxy in my work. It is a great...