# UIHelper.exists

Check presence without polling.

```js
ui.exists(selector)
```

## Arguments

| Argument | Type | Meaning |
| --- | --- | --- |
| `selector` | object \| string | Attribute filters; a string means {name: string}. See the UIHelper guide for selectors. |

## Returns

Boolean; communication/selector errors still throw.

## Example

```js
const ui = UIHelper.forApp("com.example.app");
console.log(ui.exists({id: "loading", visible: true}));
```

## Notes

Replace example identifiers with selectors verified in your app. Pinning an app does not open it.

[All JavaScript APIs](https://mcp.applesauceos.com/doc/api.md) · [Automation playbook](https://mcp.applesauceos.com/doc/ai.md)
