{"id":192,"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-mac-dev-setup\/"},"modified":"2026-03-21T23:08:54","modified_gmt":"2026-03-21T15:08:54","slug":"platforms-mac-dev-setup","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/platforms-mac-dev-setup\/","title":{"rendered":"macOS \u5f00\u53d1\u8bbe\u7f6e"},"content":{"rendered":"<h1>macOS \u5f00\u53d1\u8bbe\u7f6e<\/h1>\n<h1>macOS \u5f00\u53d1\u8005\u8bbe\u7f6e<\/h1>\n<p>\u672c\u6307\u5357\u6db5\u76d6\u4ece\u6e90\u4ee3\u7801\u6784\u5efa\u548c\u8fd0\u884c OpenClaw macOS \u5e94\u7528\u7a0b\u5e8f\u7684\u5fc5\u8981\u6b65\u9aa4\u3002<\/p>\n<h2>\u524d\u7f6e\u6761\u4ef6<\/h2>\n<p>\u5728\u6784\u5efa\u5e94\u7528\u4e4b\u524d\uff0c\u786e\u4fdd\u4f60\u5df2\u5b89\u88c5\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<ol>\n<li><strong>Xcode 26.2+<\/strong>\uff1aSwift \u5f00\u53d1\u6240\u9700\u3002<\/li>\n<li><strong>Node.js 22+ &amp; pnpm<\/strong>\uff1aGateway \u7f51\u5173\u3001CLI \u548c\u6253\u5305\u811a\u672c\u6240\u9700\u3002<\/li>\n<\/ol>\n<h2>1. \u5b89\u88c5\u4f9d\u8d56<\/h2>\n<p>\u5b89\u88c5\u9879\u76ee\u8303\u56f4\u7684\u4f9d\u8d56\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\npnpm install<\/p>\n<pre><code>\n## 2. \u6784\u5efa\u548c\u6253\u5305\u5e94\u7528\n\n\u8981\u6784\u5efa macOS \u5e94\u7528\u5e76\u5c06\u5176\u6253\u5305\u5230 `dist\/OpenClaw.app`\uff0c\u8fd0\u884c\uff1a\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\n.\/scripts\/package-mac-app.sh\n<\/code><\/pre>\n<p>\u5982\u679c\u4f60\u6ca1\u6709 Apple Developer ID \u8bc1\u4e66\uff0c\u811a\u672c\u5c06\u81ea\u52a8\u4f7f\u7528 <strong>ad-hoc \u7b7e\u540d<\/strong>\uff08<code>-<\/code>\uff09\u3002<\/p>\n<p>\u6709\u5173\u5f00\u53d1\u8fd0\u884c\u6a21\u5f0f\u3001\u7b7e\u540d\u6807\u5fd7\u548c Team ID \u6545\u969c\u6392\u9664\uff0c\u8bf7\u53c2\u9605 macOS \u5e94\u7528 README\uff1a<br \/>\n<a href=\"https:\/\/github.com\/openclaw\/openclaw\/blob\/main\/apps\/macos\/README.md\">https:\/\/github.com\/openclaw\/openclaw\/blob\/main\/apps\/macos\/README.md<\/a><\/p>\n<blockquote>\n<p><strong>\u6ce8\u610f<\/strong>\uff1aAd-hoc \u7b7e\u540d\u7684\u5e94\u7528\u53ef\u80fd\u4f1a\u89e6\u53d1\u5b89\u5168\u63d0\u793a\u3002\u5982\u679c\u5e94\u7528\u7acb\u5373\u5d29\u6e83\u5e76\u663e\u793a&#8221;Abort trap 6&#8243;\uff0c\u8bf7\u53c2\u9605<a href=\"#troubleshooting\">\u6545\u969c\u6392\u9664<\/a>\u90e8\u5206\u3002<\/p>\n<\/blockquote>\n<h2>3. \u5b89\u88c5 CLI<\/h2>\n<p>macOS \u5e94\u7528\u671f\u671b\u5168\u5c40\u5b89\u88c5 <code>openclaw<\/code> CLI \u6765\u7ba1\u7406\u540e\u53f0\u4efb\u52a1\u3002<\/p>\n<p><strong>\u5b89\u88c5\u65b9\u6cd5\uff08\u63a8\u8350\uff09\uff1a<\/strong><\/p>\n<ol>\n<li>\u6253\u5f00 OpenClaw \u5e94\u7528\u3002<\/li>\n<li>\u8f6c\u5230 <strong>General<\/strong> \u8bbe\u7f6e\u6807\u7b7e\u9875\u3002<\/li>\n<li>\u70b9\u51fb <strong>&#8220;Install CLI&#8221;<\/strong>\u3002<\/li>\n<\/ol>\n<p>\u6216\u8005\uff0c\u624b\u52a8\u5b89\u88c5\uff1a<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nnpm install -g openclaw@<\/p>\n<pre><code>\n## \u6545\u969c\u6392\u9664\n\n### \u6784\u5efa\u5931\u8d25\uff1a\u5de5\u5177\u94fe\u6216 SDK \u4e0d\u5339\u914d\n\nmacOS \u5e94\u7528\u6784\u5efa\u671f\u671b\u6700\u65b0\u7684 macOS SDK \u548c Swift 6.2 \u5de5\u5177\u94fe\u3002\n\n**\u7cfb\u7edf\u4f9d\u8d56\uff08\u5fc5\u9700\uff09\uff1a**\n\n* **\u8f6f\u4ef6\u66f4\u65b0\u4e2d\u53ef\u7528\u7684\u6700\u65b0 macOS \u7248\u672c**\uff08Xcode 26.2 SDK \u6240\u9700\uff09\n* **Xcode 26.2**\uff08Swift 6.2 \u5de5\u5177\u94fe\uff09\n\n**\u68c0\u67e5\uff1a**\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nxcodebuild -version\nxcrun swift --version\n<\/code><\/pre>\n<p>\u5982\u679c\u7248\u672c\u4e0d\u5339\u914d\uff0c\u66f4\u65b0 macOS\/Xcode \u5e76\u91cd\u65b0\u8fd0\u884c\u6784\u5efa\u3002<\/p>\n<h3>\u6388\u4e88\u6743\u9650\u65f6\u5e94\u7528\u5d29\u6e83<\/h3>\n<p>\u5982\u679c\u5728\u5c1d\u8bd5\u5141\u8bb8<strong>\u8bed\u97f3\u8bc6\u522b<\/strong>\u6216<strong>\u9ea6\u514b\u98ce<\/strong>\u8bbf\u95ee\u65f6\u5e94\u7528\u5d29\u6e83\uff0c\u53ef\u80fd\u662f\u7531\u4e8e TCC \u7f13\u5b58\u635f\u574f\u6216\u7b7e\u540d\u4e0d\u5339\u914d\u3002<\/p>\n<p><strong>\u4fee\u590d\uff1a<\/strong><\/p>\n<ol>\n<li>\u91cd\u7f6e TCC \u6743\u9650\uff1a<br \/>\n   <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n   tccutil reset All bot.molt.mac.debug<\/code><\/li>\n<li>\u5982\u679c\u8fd9\u4e0d\u8d77\u4f5c\u7528\uff0c\u5728 <a href=\"https:\/\/github.com\/openclaw\/openclaw\/blob\/main\/scripts\/package-mac-app.sh\"><code>scripts\/package-mac-app.sh<\/code><\/a> \u4e2d\u4e34\u65f6\u66f4\u6539 <code>BUNDLE_ID<\/code> \u4ee5\u5f3a\u5236 macOS \u4ece&#8221;\u5168\u65b0\u72b6\u6001&#8221;\u5f00\u59cb\u3002<\/li>\n<\/ol>\n<h3>Gateway \u7f51\u5173\u65e0\u9650\u671f&#8221;Starting&#8230;&#8221;<\/h3>\n<p>\u5982\u679c Gateway \u7f51\u5173\u72b6\u6001\u4e00\u76f4\u505c\u7559\u5728&#8221;Starting&#8230;&#8221;\uff0c\u68c0\u67e5\u662f\u5426\u6709\u50f5\u5c38\u8fdb\u7a0b\u5360\u7528\u7aef\u53e3\uff1a<\/p>\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 status<br \/>\nopenclaw gateway stop<\/p>\n<h1>\u5982\u679c\u4f60\u6ca1\u6709\u4f7f\u7528 LaunchAgent\uff08\u5f00\u53d1\u6a21\u5f0f\/\u624b\u52a8\u8fd0\u884c\uff09\uff0c\u627e\u5230\u76d1\u542c\u5668\uff1a<\/h1>\n<p>lsof -nP -iTCP:18789 -sTCP:LISTEN<br \/>\n&#8220;`<\/p>\n<p>\u5982\u679c\u624b\u52a8\u8fd0\u884c\u5360\u7528\u4e86\u7aef\u53e3\uff0c\u505c\u6b62\u8be5\u8fdb\u7a0b\uff08Ctrl+C\uff09\u3002\u4f5c\u4e3a\u6700\u540e\u624b\u6bb5\uff0c\u6740\u6b7b\u4f60\u627e\u5230\u7684 PID\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>macOS \u5f00\u53d1\u8bbe\u7f6e macOS \u5f00\u53d1\u8005\u8bbe\u7f6e \u672c\u6307\u5357\u6db5\u76d6\u4ece\u6e90\u4ee3\u7801\u6784\u5efa\u548c\u8fd0\u884c OpenClaw macOS \u5e94\u7528 [&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-192","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/192","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=192"}],"version-history":[{"count":1,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/192\/revisions"}],"predecessor-version":[{"id":487,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/192\/revisions\/487"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}