iOS 应用(节点)
可用性:内部预览。iOS 应用尚未公开发布�?
功能
- 通过 WebSocket 连接�?Gateway(局域网�?tailnet)�?
- 暴露节点功能:画布、屏幕快照、相机捕捉、位置、对话模式、语音唤醒�?
- 接收
node.invoke命令并报告节点状态事件�?
前提条件
- Gateway 在另一台设备上运行(macOS、Linux �?Windows 通过 WSL2)�?
- 网络路径�?
- 通过 Bonjour 在同一局域网�?�?
- 通过单播 DNS-SD �?tailnet 上(示例域:
openclaw.internal.),**�?* - 手动主机/端口(后备)�?
快速开始(配对 + 连接�?
- 启动 Gateway�?
openclaw gateway --port 18789
-
�?iOS 应用中,打开设置并选择发现�?Gateway(或启用手动主机并输入主�?端口)�?
-
�?Gateway 主机上批准配对请求:
openclaw nodes pending
openclaw nodes approve <requestId>
- 验证连接�?
openclaw nodes status
openclaw gateway call node.list --params "{}"
发现路径
Bonjour(局域网�?
Gateway �?local. 上通告 _openclaw-gw._tcp。iOS 应用会自动列出这些�?
Tailnet(跨网络�?
如果 mDNS 被阻止,请使用单�?DNS-SD 区域(选择一个域;示例:openclaw.internal.)和 Tailscale 分割 DNS�?
请参�?Bonjour 中的 CoreDNS 示例�?
手动主机/端口
在设置中,启�?*手动主机**并输�?Gateway 主机和端口(默认 18789)�?
画布 + A2UI
iOS 节点呈现一�?WKWebView 画布。使�?node.invoke 驱动它:
openclaw nodes invoke --node "iOS Node" --command canvas.navigate --params '{"url":"http://<gateway-host>:18789/__openclaw__/canvas/"}'
注意�?
- Gateway 画布主机提供
/__openclaw__/canvas/�?/__openclaw__/a2ui/�? - 它从 Gateway HTTP 服务器提供(�?
gateway.port相同的端口,默认18789)�? - 当画布主�?URL 被通告时,iOS 节点会在连接时自动导航到 A2UI�?
- 使用
canvas.navigate�?{"url":""}返回内置脚手架�?
画布评估/快照
openclaw nodes invoke --node "iOS Node" --command canvas.eval --params '{"javaScript":"(() => { const {ctx} = window.__openclaw; 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\"; })()"}'
openclaw nodes invoke --node "iOS Node" --command canvas.snapshot --params '{"maxWidth":900,"format":"jpeg"}'
语音唤醒 + 对话模式
- 语音唤醒和对话模式在设置中可用�?
- iOS 可能会暂停后台音频;当应用不活动时,将语音功能视为尽力而为�?
常见错误
NODE_BACKWORK_UNAVAILABLE:将 iOS 应用带到前台(画�?相机/屏幕命令需要它)�?A2UI_HOST_NOT_CONFIGURED:Gateway 没有通告画布主机 URL;请检�?Gateway 配置 中的canvasHost�?- 配对提示从不出现:运�?
openclaw nodes pending并手动批准�? - 重新安装后重新连接失败:Keychain 配对令牌已被清除;重新配对节点�?