native-find-views
Locate specific UIViews in a running app using class, identifier, label, tag, or nativeID. Get matching frames and properties without dumping the full hierarchy.
Instructions
Search for specific UIViews in the running app by class name, accessibility identifier, label, tag, or React Native nativeID.
Use when you need to locate a specific view by its properties without dumping the entire hierarchy.
Returns { status: "ok", matches } with matching views including their frames, properties, optional ancestors, and optional children. Much more targeted than native-full-hierarchy.
At least one of className, identifier, label, tag, or nativeID must be provided.
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-connected or not-running app comes back as one of those statuses rather than a failure. Failures are separate: an Apple system app is rejected outright (terminal — never retry it), and the hierarchy query itself can error or time out.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | UIView tag integer to match | |
| udid | Yes | Simulator UDID | |
| label | No | Accessibility label to match (exact) | |
| fields | No | View fields to include. Defaults: className, frame, hidden, alpha, identifier, label, nativeID, userInteractionEnabled, depth. Additional: pointer, tag, windowFrame, bounds, center, opaque, clipsToBounds, transform, contentMode, backgroundColor, tintColor, layerName | |
| bundleId | Yes | Bundle ID of the app | |
| nativeID | No | React Native nativeID prop to match (exact) | |
| className | No | UIView class name to match (exact, e.g. UIButton) | |
| identifier | No | Accessibility identifier to match (exact) | |
| includeChildren | No | Include child views for each matched view (default true) | |
| includeAncestors | No | Include ancestor chain for each matched view (default true) |