native-network-logs
Capture native network traffic at NSURLProtocol level, including native modules, Swift/Objective-C networking, and background transfers invisible to JS fetch. Returns status, count, and events.
Instructions
Retrieve network requests captured at the native NSURLProtocol level.
Unlike the JS-level network inspector (view-network-logs), this captures ALL network traffic from the app including native modules, Swift/Objective-C networking, and background transfers that bypass JS fetch.
Use when you need to inspect native-level HTTP traffic that is invisible to JS fetch interception.
Returns { status, count, events } where each event contains URL, method, status code, headers, and timing.
If status is restart_required: follow the message (usually restart-app), then retry. If status is service_stale: the app is already injected, so restarting it cannot help — restart the tool-server (argent server stop && argent server start --detach) and retry. If the same status comes back after that restart, stop restarting: follow the message, which names the terminal fallback. If status is connect_pending: the app is injected and still connecting — do not restart it, wait a few seconds and retry. If status is init_failed: the simulator's native-devtools environment could not be initialised — follow the message (re-boot the simulator) rather than retrying this tool.
A not-running app comes back as one of those statuses rather than a failure. An app that is not connected does too, except on a device whose devtools agent argent attached to rather than armed itself — there it fails with NATIVE_DEVTOOLS_NOT_CONNECTED, since no restart of ours can complete a handshake we do not own. Failures are separate: an Apple system app is rejected outright (terminal — never retry it), while a missing host dependency or a udid that is not an Apple device is not.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | Simulator UDID | |
| clear | No | Clear the log after reading | |
| limit | No | Maximum number of events to return (most recent first) | |
| bundleId | Yes | Bundle ID of the app |