{"id":187,"date":"2026-03-21T22:47:21","date_gmt":"2026-03-21T14:47:21","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/platforms-ios\/"},"modified":"2026-03-21T23:08:56","modified_gmt":"2026-03-21T15:08:56","slug":"platforms-ios","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/platforms-ios\/","title":{"rendered":"iOS \u5e94\u7528"},"content":{"rendered":"<h1>iOS \u5e94\u7528<\/h1>\n<h1>iOS \u5e94\u7528\uff08\u8282\u70b9\uff09<\/h1>\n<p>\u53ef\u7528\u6027\uff1a\u5185\u90e8\u9884\u89c8\u3002iOS \u5e94\u7528\u5c1a\u672a\u516c\u5f00\u5206\u53d1\u3002<\/p>\n<h2>\u529f\u80fd<\/h2>\n<ul>\n<li>\u901a\u8fc7 WebSocket\uff08LAN \u6216 tailnet\uff09\u8fde\u63a5\u5230 Gateway \u7f51\u5173\u3002<\/li>\n<li>\u66b4\u9732\u8282\u70b9\u80fd\u529b\uff1aCanvas\u3001\u5c4f\u5e55\u5feb\u7167\u3001\u76f8\u673a\u6355\u83b7\u3001\u4f4d\u7f6e\u3001\u5bf9\u8bdd\u6a21\u5f0f\u3001\u8bed\u97f3\u5524\u9192\u3002<\/li>\n<li>\u63a5\u6536 <code>node.invoke<\/code> \u547d\u4ee4\u5e76\u62a5\u544a\u8282\u70b9\u72b6\u6001\u4e8b\u4ef6\u3002<\/li>\n<\/ul>\n<h2>\u8981\u6c42<\/h2>\n<ul>\n<li>Gateway \u7f51\u5173\u8fd0\u884c\u5728\u53e6\u4e00\u53f0\u8bbe\u5907\u4e0a\uff08macOS\u3001Linux \u6216\u901a\u8fc7 WSL2 \u7684 Windows\uff09\u3002<\/li>\n<li>\u7f51\u7edc\u8def\u5f84\uff1a<\/li>\n<li>\u901a\u8fc7 Bonjour \u7684\u540c\u4e00 LAN\uff0c<strong>\u6216<\/strong><\/li>\n<li>\u901a\u8fc7\u5355\u64ad DNS-SD \u7684 Tailnet\uff08\u793a\u4f8b\u57df\uff1a<code>openclaw.internal.<\/code>\uff09\uff0c<strong>\u6216<\/strong><\/li>\n<li>\u624b\u52a8\u4e3b\u673a\/\u7aef\u53e3\uff08\u5907\u9009\uff09\u3002<\/li>\n<\/ul>\n<h2>\u5feb\u901f\u5f00\u59cb\uff08\u914d\u5bf9 + \u8fde\u63a5\uff09<\/h2>\n<ol>\n<li>\u542f\u52a8 Gateway \u7f51\u5173\uff1a<\/li>\n<\/ol>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw gateway &#8211;port 18789<\/p>\n<pre><code>\n2. \u5728 iOS \u5e94\u7528\u4e2d\uff0c\u6253\u5f00\u8bbe\u7f6e\u5e76\u9009\u62e9\u4e00\u4e2a\u5df2\u53d1\u73b0\u7684 Gateway \u7f51\u5173\uff08\u6216\u542f\u7528\u624b\u52a8\u4e3b\u673a\u5e76\u8f93\u5165\u4e3b\u673a\/\u7aef\u53e3\uff09\u3002\n\n3. \u5728 Gateway \u7f51\u5173\u4e3b\u673a\u4e0a\u6279\u51c6\u914d\u5bf9\u8bf7\u6c42\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw nodes pending\nopenclaw nodes approve &lt;requestId&gt;\n<\/code><\/pre>\n<ol start=\"4\">\n<li>\u9a8c\u8bc1\u8fde\u63a5\uff1a<\/li>\n<\/ol>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw nodes status<br \/>\nopenclaw gateway call node.list &#8211;params &#8220;{}&#8221;<\/p>\n<pre><code>\n## \u53d1\u73b0\u8def\u5f84\n\n### Bonjour\uff08LAN\uff09\n\nGateway \u7f51\u5173\u5728 `local.` \u4e0a\u5e7f\u64ad `_openclaw-gw._tcp`\u3002iOS \u5e94\u7528\u4f1a\u81ea\u52a8\u5217\u51fa\u8fd9\u4e9b\u3002\n\n### Tailnet\uff08\u8de8\u7f51\u7edc\uff09\n\n\u5982\u679c mDNS \u88ab\u963b\u6b62\uff0c\u4f7f\u7528\u5355\u64ad DNS-SD \u533a\u57df\uff08\u9009\u62e9\u4e00\u4e2a\u57df\uff1b\u793a\u4f8b\uff1a`openclaw.internal.`\uff09\u548c Tailscale \u5206\u5272 DNS\u3002\n\u53c2\u89c1 [Bonjour](\/gateway\/bonjour) \u4e86\u89e3 CoreDNS \u793a\u4f8b\u3002\n\n### \u624b\u52a8\u4e3b\u673a\/\u7aef\u53e3\n\n\u5728\u8bbe\u7f6e\u4e2d\uff0c\u542f\u7528**\u624b\u52a8\u4e3b\u673a**\u5e76\u8f93\u5165 Gateway \u7f51\u5173\u4e3b\u673a + \u7aef\u53e3\uff08\u9ed8\u8ba4 `18789`\uff09\u3002\n\n## Canvas + A2UI\n\niOS \u8282\u70b9\u6e32\u67d3\u4e00\u4e2a WKWebView canvas\u3002\u4f7f\u7528 `node.invoke` \u6765\u9a71\u52a8\u5b83\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw nodes invoke --node &quot;iOS Node&quot; --command canvas.navigate --params '{&quot;url&quot;:&quot;http:\/\/&lt;gateway-host&gt;:18793\/__openclaw__\/canvas\/&quot;}'\n<\/code><\/pre>\n<p>\u6ce8\u610f\u4e8b\u9879\uff1a<\/p>\n<ul>\n<li>Gateway \u7f51\u5173 canvas \u4e3b\u673a\u670d\u52a1\u4e8e <code>\/__openclaw__\/canvas\/<\/code> \u548c <code>\/__openclaw__\/a2ui\/<\/code>\u3002<\/li>\n<li>\u5f53\u5e7f\u64ad\u4e86 canvas \u4e3b\u673a URL \u65f6\uff0ciOS \u8282\u70b9\u5728\u8fde\u63a5\u65f6\u81ea\u52a8\u5bfc\u822a\u5230 A2UI\u3002<\/li>\n<li>\u4f7f\u7528 <code>canvas.navigate<\/code> \u548c <code>{\"url\":\"\"}<\/code> \u8fd4\u56de\u5185\u7f6e\u811a\u624b\u67b6\u3002<\/li>\n<\/ul>\n<h3>Canvas eval \/ snapshot<\/h3>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw nodes invoke &#8211;node &#8220;iOS Node&#8221; &#8211;command canvas.eval &#8211;params &#8216;{&#8220;javaScript&#8221;:&#8221;(() =&gt; { const {ctx} = window.__openclaw; ctx.clearRect(0,0,innerWidth,innerHeight); ctx.lineWidth=6; ctx.strokeStyle=&#8221;#ff2d55&#8243;; ctx.beginPath(); ctx.moveTo(40,40); ctx.lineTo(innerWidth-40, innerHeight-40); ctx.stroke(); return &#8220;ok&#8221;; })()&#8221;}&#8217;<\/p>\n<pre><code>\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw nodes invoke --node &quot;iOS Node&quot; --command canvas.snapshot --params '{&quot;maxWidth&quot;:900,&quot;format&quot;:&quot;jpeg&quot;}'\n<\/code><\/pre>\n<h2>\u8bed\u97f3\u5524\u9192 + \u5bf9\u8bdd\u6a21\u5f0f<\/h2>\n<ul>\n<li>\u8bed\u97f3\u5524\u9192\u548c\u5bf9\u8bdd\u6a21\u5f0f\u5728\u8bbe\u7f6e\u4e2d\u53ef\u7528\u3002<\/li>\n<li>iOS \u53ef\u80fd\u4f1a\u6682\u505c\u540e\u53f0\u97f3\u9891\uff1b\u5f53\u5e94\u7528\u4e0d\u6d3b\u8dc3\u65f6\uff0c\u5c06\u8bed\u97f3\u529f\u80fd\u89c6\u4e3a\u5c3d\u529b\u800c\u4e3a\u3002<\/li>\n<\/ul>\n<h2>\u5e38\u89c1\u9519\u8bef<\/h2>\n<ul>\n<li><code>NODE_BACKGROUND_UNAVAILABLE<\/code>\uff1a\u5c06 iOS \u5e94\u7528\u5e26\u5230\u524d\u53f0\uff08canvas\/\u76f8\u673a\/\u5c4f\u5e55\u547d\u4ee4\u9700\u8981\u5b83\uff09\u3002<\/li>\n<li><code>A2UI_HOST_NOT_CONFIGURED<\/code>\uff1aGateway \u7f51\u5173\u672a\u5e7f\u64ad canvas \u4e3b\u673a URL\uff1b\u68c0\u67e5 <a href=\"\/gateway\/configuration\">Gateway \u7f51\u5173\u914d\u7f6e<\/a> \u4e2d\u7684 <code>canvasHost<\/code>\u3002<\/li>\n<li>\u914d\u5bf9\u63d0\u793a\u4ece\u672a\u51fa\u73b0\uff1a\u8fd0\u884c <code>openclaw nodes pending<\/code> \u5e76\u624b\u52a8\u6279\u51c6\u3002<\/li>\n<li>\u91cd\u65b0\u5b89\u88c5\u540e\u91cd\u8fde\u5931\u8d25\uff1a\u94a5\u5319\u4e32\u914d\u5bf9\u4ee4\u724c\u5df2\u88ab\u6e05\u9664\uff1b\u91cd\u65b0\u914d\u5bf9\u8282\u70b9\u3002<\/li>\n<\/ul>\n<h2>\u76f8\u5173\u6587\u6863<\/h2>\n<ul>\n<li><a href=\"\/gateway\/pairing\">\u914d\u5bf9<\/a><\/li>\n<li><a href=\"\/gateway\/discovery\">\u8bbe\u5907\u53d1\u73b0<\/a><\/li>\n<li><a href=\"\/gateway\/bonjour\">Bonjour<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>iOS \u5e94\u7528 iOS \u5e94\u7528\uff08\u8282\u70b9\uff09 \u53ef\u7528\u6027\uff1a\u5185\u90e8\u9884\u89c8\u3002iOS \u5e94\u7528\u5c1a\u672a\u516c\u5f00\u5206\u53d1\u3002 \u529f\u80fd \u901a\u8fc7 WebSocke [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-187","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":1,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"predecessor-version":[{"id":482,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/187\/revisions\/482"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}