iOS 应用目前为内部预览,尚未公开发布。通过 WebSocket 连接 Gateway,暴露 Canvas、屏幕截图、摄像头、位置、语音等节点能力。

连接方式

  • 同 LAN:Bonjour(_openclaw-gw._tcp)自动发现
  • 跨网络:Tailscale unicast DNS-SD(如 openclaw.internal.)
  • 手动:Settings → Manual Host,输入 host/port

配对流程

# 1. 启动 Gateway
openclaw gateway --port 18789
 
# 2. 在 Gateway 主机审批
openclaw devices list
openclaw devices approve <requestId>
 
# 3. 验证连接
openclaw nodes status
openclaw gateway call node.list --params "{}"

推送通知(官方构建)

官方 iOS 构建使用外部推送中继(relay),而非直接 APNs:

{
  gateway: {
    push: { apns: { relay: { baseUrl: "https://relay.example.com" } } }
  }
}

本地/手动构建仍需直接 APNs 凭证:

export OPENCLAW_APNS_TEAM_ID="TEAMID"
export OPENCLAW_APNS_KEY_ID="KEYID"
export OPENCLAW_APNS_PRIVATE_KEY_P8="$(cat /path/to/AuthKey_KEYID.p8)"

Canvas 与 A2UI

# 导航到 Gateway Canvas Host
openclaw nodes invoke --node "iOS Node" --command canvas.navigate \
  --params '{"url":"http://<gateway-host>:18789/__openclaw__/canvas/"}'
 
# 截图
openclaw nodes invoke --node "iOS Node" --command canvas.snapshot \
  --params '{"maxWidth":900,"format":"jpeg"}'

常见错误

错误原因/解决
NODE_BACKGROUND_UNAVAILABLE将 iOS 应用切到前台
A2UI_HOST_NOT_CONFIGURED检查 plugins.entries.canvas.config.host
配对提示不出现运行 openclaw devices list 手动审批
重装后重连失败Keychain 配对 token 已清除,重新配对

相关链接