ios_safari_list_pages
List inspectable Safari pages on an iOS device via the Web Inspector CDP bridge. Returns index, pageId (the CDP target id), url, title, type, active, and state per page, plus a top-level currentActiveTab (the pageId on screen, or null when none is). index is positional within THIS listing and is not stable across calls — resolve it to a pageId here, then pass that pageId. iOS shows exactly ONE tab at a time, so every ios_safari_* tool called WITHOUT pageId drives the active tab and refuses a backgrounded one — you do NOT need to list pages and thread an id just to act on the current tab, only to target a DIFFERENT one. state says what each page is doing, and the distinction matters because the fixes are opposite: "foreground" = the tab on screen (at most one, and it is the active: true one); "background" = alive but not visible, because another tab or another app is in front — pass its pageId explicitly to drive it anyway; "unresponsive" = the page answers nothing, either because it is suspended (device asleep or locked) or because a dialog (alert/confirm/prompt) is open and blocking the page — those look identical from here, so take a screenshot to tell them apart rather than assuming the device is asleep; "unprobed" = past the probe cap, nothing was measured. Pages "background" with no foreground means Safari is not frontmost. Confirming state costs one bounded check per page (run in parallel), so this is a little slower than a bare listing and never fails the whole call just because nothing is in the foreground. Requires Web Inspector enabled: Settings → Safari → Advanced → Web Inspector.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | iOS device UDID | |
| platformVersion | No | Ignored (kept for compatibility) |