native-find-views
Locate UIViews by class, accessibility identifier, label, tag, or nativeID in a running app. Returns matching views with frames and properties.
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. Fails if native devtools are not connected, the app is not running, or status is restart_required (call restart-app then retry).
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) |