ios_safari_heap_snapshot
Take a JavaScript heap snapshot of a Safari page on an iOS device and write it to a file on the RDS host, returning { nodeCount, edgeCount, bytes, path }. The file is a V8-format .heapsnapshot that loads directly in Chrome DevTools → Memory → "Load profile", so it can be handed to a human to open. Snapshots are multi-MB, which is why the content is never returned inline. Use it to find what a page is retaining: take one, exercise the leak, take another, and compare nodeCount/edgeCount — a count that climbs and never comes back down across repetitions of the same interaction is the signal. Garbage is collected first by default so unreachable objects do not read as a leak; pass collectGarbage=false only when you deliberately want to measure uncollected garbage. Omit pageId to use the active tab. Requires Web Inspector enabled: Settings → Safari → Advanced → Web Inspector.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | iOS device UDID | |
| pageId | No | Target page id from ios_safari_list_pages (default: active tab) | |
| collectGarbage | No | Run garbage collection before snapshotting (default: true) |