Guides
Debug a mobile app
Capture and decrypt HTTPS from an iPhone or iPad on your Wi-Fi, find a failing API call, edit and resend it, and pause it at a breakpoint.
Your iPhone app makes a call that fails, and the Xcode console only shows a status code. This guide captures the app’s HTTPS traffic on your Mac, decrypts it, finds the failing request, resends it with a fix, and pauses it mid-flight so you can change it before it reaches the server. It finishes by removing the proxy and certificate from the device.
What you need
Section titled “What you need”| An iPhone or iPad on the same Wi-Fi network as your Mac | The device sends its traffic to Cloak Proxy over the network |
| Cloak Proxy running, with the certificate trusted on this Mac | See Install and the certificate page |
| An app you own or are authorized to debug | Decrypting someone else’s traffic without permission is off limits |
Let the device connect
Section titled “Let the device connect”By default Cloak Proxy listens only on 127.0.0.1, so other devices can’t reach it. Turn that on first.
-
Open Settings → Network (or Settings → General) and turn on Allow other devices to connect (phones, other computers).
The Devices window’s iPhone & iPad tab also has an Allow Other Devices to Connect button that does the same thing.
-
Note This Mac’s address shown below the toggle, for example
192.168.1.20, and the port (9090by default).Turn on Allow other devices to connect, then apply and restart the proxy.
- Listening port (9090 by default)
- Allow other devices to connect
- Apply & Restart Proxy after changing it
Point the device at Cloak Proxy and trust the certificate
Section titled “Point the device at Cloak Proxy and trust the certificate”Open the Devices window (the Devices toolbar button) and choose iPhone & iPad.
The iPhone & iPad tab: Wi-Fi proxy, then the certificate.
- Allow Other Devices to Connect, if not done yet
- Wi-Fi proxy: your Mac's IP and port
- Scan to open the certificate page
- http://cloak.proxy also opens it in Safari
-
On the iPhone, open Settings → Wi-Fi, tap the ⓘ next to your network, then Configure Proxy → Manual. Enter your Mac’s address as the Server and
9090as the Port. -
Install the certificate. Scan the QR code in the Devices window with the iPhone camera, or open http://cloak.proxy in Safari on the device, and download the certificate.
The certificate page is served by Cloak Proxy itself. On iOS, download the PEM profile.
-
On the iPhone, open Settings → General → VPN & Device Management and install the downloaded profile.
-
Turn on full trust: Settings → General → About → Certificate Trust Settings, and enable trust for Cloak Proxy CA.
Decrypt the app’s traffic
Section titled “Decrypt the app’s traffic”Use the app on the device. Its requests appear in the traffic list, grouped by app and domain in the sidebar. At first HTTPS shows as locked tunnels: Cloak Proxy relays them without reading them.
-
Select the app in the Apps section of the sidebar, or a request from it.
-
Click Enable SSL Proxying for All Requests in the bar above the table, or right-click the domain and choose Enable SSL Proxying for host.
A locked tunnel. Enabling SSL Proxying closes it so the app reconnects decrypted.
- Enable only this host
- Or every domain from this app
-
Enabling closes the open tunnels, so the app reconnects with decryption on. The next matching requests show method, URL, headers and bodies.
Find the failing call
Section titled “Find the failing call”-
Filter the list to the call you care about. Press
<kbd>⌘</kbd> <kbd>F</kbd>, choose the field (URL, Host, Status Code, Response Body…) and a match mode, and type.The traffic list and inspector. The filter bar is at the top.
- Filter field and match mode (⌘F)
- Content chips: JSON, Form, GraphQL…
- Request and response tabs
- Response body, here a JSON tree
-
Click a failed request. A request that never reached the server shows No response with the reason (for example a DNS or TLS error).
A failed request: the reason is shown in both the header bar and the response pane.
- Failed, with timing
- The failure reason
- No response pane
-
Read the request and response tabs: Header, Query, Body, Cookies, Auth (JWT and Basic are decoded), and Raw. Use the response Body viewer’s Tree, Pretty, Raw or Hex modes.
Resend it with a fix
Section titled “Resend it with a fix”Once you see what’s wrong, change the request and send it again — through Cloak Proxy, so your tools still apply.
Right-click the request and choose Edit and Repeat… (<kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>E</kbd>). The Compose window opens prefilled with the request. Change the method, URL, headers or body and press Send (<kbd>⌘</kbd> <kbd>↩</kbd>).
Compose, prefilled by Edit and Repeat. Send goes through Cloak Proxy.
- Method and URL
- Send (⌘↩)
- Import cURL to paste a command
- Response appears below
To resend it unchanged, right-click and choose Repeat (<kbd>⌘</kbd> <kbd>R</kbd>). The result appears in the list as a new request.
The resent request shows up in the main window under the app Cloak Proxy (Compose).
Pause it at a breakpoint
Section titled “Pause it at a breakpoint”To change a request or its response while the app is waiting, set a breakpoint. The app stalls until you decide.
-
Right-click the request and choose Tools → Breakpoint…, or open Tools → Breakpoint and add a rule. Creating it from a request fills in the matcher and turns the tool on.
A breakpoint rule. Pause on the request, the response, or both.
- Tool on/off
- Matcher: method, URL, wildcard or regex
- Pause on request and/or response
-
Make the device repeat the call. When it matches, the Breakpoint window opens and the status bar shows how many are paused.
A paused request. Edit the method, URL, headers or body, then Execute.
- Request paused, with its rule
- Execute sends your edits
- Cancel sends the original
- Abort drops it
-
Edit the request and click Execute (
<kbd>⌘</kbd> <kbd>↩</kbd>) to send your version, Cancel to send the original, or Abort to drop it. -
If the rule also pauses the response, the window reopens when the response comes back. Change the status, headers or body (use Quick status for common codes) and Execute.
A paused response. Change the status, headers or body before the app receives it.
- Response paused
- Status code, with Quick status
- Format or Minify the JSON body
-
To release everything at once without edits, click Continue All.
Clean up
Section titled “Clean up”When you finish, undo the changes on the device and the Mac:
-
On the iPhone, remove the Wi-Fi proxy: Settings → Wi-Fi → ⓘ → Configure Proxy → Off.
-
Remove the profile: Settings → General → VPN & Device Management, select Cloak Proxy CA, and remove it.
-
On the Mac, turn off Breakpoint (and any other tool you enabled) in the Tools window or the Tools menu.
-
Turn off Allow other devices to connect in Settings → Network when you no longer need device access.