Files
openclaw/docs/platforms/ios.md

106 lines
3.4 KiB
Markdown
Raw Normal View History

---
2026-01-08 23:06:56 +01:00
summary: "iOS node app: connect to the Gateway, pairing, canvas, and troubleshooting"
read_when:
2026-01-05 20:59:54 +01:00
- Pairing or reconnecting the iOS node
2026-01-08 23:06:56 +01:00
- Running the iOS app from source
- Debugging bridge discovery or canvas commands
---
2026-01-05 20:59:54 +01:00
# iOS App (Node)
2026-01-08 23:06:56 +01:00
Availability: internal preview. The iOS app is not publicly distributed yet.
2026-01-08 23:06:56 +01:00
## What it does
2026-01-07 21:37:05 +01:00
2026-01-08 23:06:56 +01:00
- Connects to a Gateway over the bridge (LAN or tailnet).
- Exposes node capabilities: Canvas, Screen snapshot, Camera capture, Location, Talk mode, Voice wake.
- Receives `node.invoke` commands and reports node status events.
2026-01-07 21:37:05 +01:00
2026-01-08 23:06:56 +01:00
## Requirements
2025-12-13 23:49:38 +00:00
2026-01-08 23:06:56 +01:00
- Gateway running on another device (macOS, Linux, or Windows via WSL2).
- Bridge enabled (default).
- Network path:
- Same LAN via Bonjour, **or**
- Tailnet via unicast DNS-SD (`clawdbot.internal.`), **or**
- Manual host/port (fallback).
2026-01-05 20:59:54 +01:00
2026-01-08 23:06:56 +01:00
## Quick start (pair + connect)
2026-01-05 20:59:54 +01:00
2026-01-08 23:06:56 +01:00
1) Start the Gateway (bridge enabled by default):
2026-01-05 20:59:54 +01:00
```bash
2026-01-08 23:06:56 +01:00
clawdbot gateway --port 18789
2026-01-05 20:59:54 +01:00
```
2026-01-08 23:06:56 +01:00
2) In the iOS app, open Settings and pick a discovered gateway (or enable Manual Bridge and enter host/port).
2026-01-05 20:59:54 +01:00
2026-01-08 23:06:56 +01:00
3) Approve the pairing request on the gateway host:
2026-01-05 20:59:54 +01:00
```bash
clawdbot nodes pending
2026-01-08 23:06:56 +01:00
clawdbot nodes approve <requestId>
2026-01-05 20:59:54 +01:00
```
2026-01-08 23:06:56 +01:00
4) Verify connection:
2026-01-05 20:59:54 +01:00
```bash
2026-01-08 23:06:56 +01:00
clawdbot nodes status
clawdbot gateway call node.list --params "{}"
2026-01-05 20:59:54 +01:00
```
2026-01-08 23:06:56 +01:00
## Discovery paths
2026-01-05 20:59:54 +01:00
2026-01-08 23:06:56 +01:00
### Bonjour (LAN)
2026-01-05 20:59:54 +01:00
2026-01-08 23:06:56 +01:00
The Gateway advertises `_clawdbot-bridge._tcp` on `local.`. The iOS app lists these automatically.
2026-01-05 20:59:54 +01:00
2026-01-08 23:06:56 +01:00
### Tailnet (cross-network)
2026-01-05 20:59:54 +01:00
2026-01-08 23:06:56 +01:00
If mDNS is blocked, use a unicast DNS-SD zone (recommended domain: `clawdbot.internal.`) and Tailscale split DNS.
2026-01-10 14:51:21 -06:00
See [Bonjour](/gateway/bonjour) for the CoreDNS example.
2026-01-05 20:59:54 +01:00
2026-01-08 23:06:56 +01:00
### Manual host/port
2026-01-05 20:59:54 +01:00
2026-01-08 23:06:56 +01:00
In Settings, enable **Manual Bridge** and enter the gateway host + port (default `18790`).
2026-01-05 20:59:54 +01:00
2026-01-08 23:06:56 +01:00
## Canvas + A2UI
2026-01-05 20:59:54 +01:00
2026-01-08 23:06:56 +01:00
The iOS node renders a WKWebView canvas. Use `node.invoke` to drive it:
2026-01-05 20:59:54 +01:00
```bash
2026-01-08 23:06:56 +01:00
clawdbot nodes invoke --node "iOS Node" --command canvas.navigate --params '{"url":"http://<gateway-host>:18793/__clawdbot__/canvas/"}'
2026-01-05 20:59:54 +01:00
```
Notes:
2026-01-08 23:06:56 +01:00
- The Gateway canvas host serves `/__clawdbot__/canvas/` and `/__clawdbot__/a2ui/`.
- The iOS node auto-navigates to A2UI on connect when a canvas host URL is advertised.
- Return to the built-in scaffold with `canvas.navigate` and `{"url":""}`.
2026-01-05 20:59:54 +01:00
2026-01-08 23:06:56 +01:00
### Canvas eval / snapshot
2026-01-05 20:59:54 +01:00
```bash
2026-01-08 23:06:56 +01:00
clawdbot nodes invoke --node "iOS Node" --command canvas.eval --params '{"javaScript":"(() => { const {ctx} = window.__clawdbot; ctx.clearRect(0,0,innerWidth,innerHeight); ctx.lineWidth=6; ctx.strokeStyle=\"#ff2d55\"; ctx.beginPath(); ctx.moveTo(40,40); ctx.lineTo(innerWidth-40, innerHeight-40); ctx.stroke(); return \"ok\"; })()"}'
2026-01-05 20:59:54 +01:00
```
```bash
2026-01-08 23:06:56 +01:00
clawdbot nodes invoke --node "iOS Node" --command canvas.snapshot --params '{"maxWidth":900,"format":"jpeg"}'
2026-01-05 20:59:54 +01:00
```
2026-01-08 23:06:56 +01:00
## Voice wake + talk mode
2026-01-08 23:06:56 +01:00
- Voice wake and talk mode are available in Settings.
- iOS may suspend background audio; treat voice features as best-effort when the app is not active.
## Common errors
2026-01-08 23:06:56 +01:00
- `NODE_BACKGROUND_UNAVAILABLE`: bring the iOS app to the foreground (canvas/camera/screen commands require it).
2026-01-10 14:51:21 -06:00
- `A2UI_HOST_NOT_CONFIGURED`: the Gateway did not advertise a canvas host URL; check `canvasHost` in [Gateway configuration](/gateway/configuration).
2026-01-08 23:06:56 +01:00
- Pairing prompt never appears: run `clawdbot nodes pending` and approve manually.
- Reconnect fails after reinstall: the Keychain pairing token was cleared; re-pair the node.
2026-01-05 20:59:54 +01:00
## Related docs
2026-01-08 23:06:56 +01:00
- [Pairing](/gateway/pairing)
- [Discovery](/gateway/discovery)
- [Bonjour](/gateway/bonjour)