Asosiy tarkibga o'tish

41. macOS Developer Setup

  1. Ushbu qo‘llanma OpenClaw macOS ilovasini manba koddan yig‘ish va ishga tushirish uchun zarur qadamlarni qamrab oladi.

43. Oldindan talablar

  1. Ilovani yig‘ishdan oldin quyidagilar o‘rnatilganligiga ishonch hosil qiling:
    1. Xcode 26.2+: Swift’da ishlab chiqish uchun zarur.
    1. Node.js 22+ & pnpm: Gateway, CLI va paketlash skriptlari uchun zarur.

47) 1) 48) Bog‘liqliklarni o‘rnatish

  1. Loyiha bo‘yicha umumiy bog‘liqliklarni o‘rnating:
50. pnpm install

2. Build and Package the App

To build the macOS app and package it into dist/OpenClaw.app, run:
./scripts/package-mac-app.sh
Dev ishga tushirish rejimlari, imzolash flaglari va Team ID bilan bog‘liq muammolarni hal qilish uchun macOS app README ga qarang: https://github.com/openclaw/openclaw/blob/main/apps/macos/README.md For dev run modes, signing flags, and Team ID troubleshooting, see the macOS app README: https://github.com/openclaw/openclaw/blob/main/apps/macos/README.md
Note: Ad-hoc signed apps may trigger security prompts. If the app crashes immediately with “Abort trap 6”, see the Troubleshooting section.

3. Install the CLI

Uni o‘rnatish uchun (tavsiya etiladi): To install it (recommended):
  1. Open the OpenClaw app.
  2. Go to the General settings tab.
  3. Click “Install CLI”.
Alternatively, install it manually:
npm install -g openclaw@<version>

Troubleshooting

Build Fails: Toolchain or SDK Mismatch

The macOS app build expects the latest macOS SDK and Swift 6.2 toolchain. System dependencies (required):
  • Latest macOS version available in Software Update (required by Xcode 26.2 SDKs)
  • Xcode 26.2 (Swift 6.2 toolchain)
Checks:
xcodebuild -version
xcrun swift --version
If versions don’t match, update macOS/Xcode and re-run the build.

App Crashes on Permission Grant

If the app crashes when you try to allow Speech Recognition or Microphone access, it may be due to a corrupted TCC cache or signature mismatch. Fix:
  1. Reset the TCC permissions:
    tccutil reset All bot.molt.mac.debug
    
  2. If that fails, change the BUNDLE_ID temporarily in scripts/package-mac-app.sh to force a “clean slate” from macOS.

Gateway “Starting…” indefinitely

If the gateway status stays on “Starting…”, check if a zombie process is holding the port:
openclaw gateway status
openclaw gateway stop

# If you’re not using a LaunchAgent (dev mode / manual runs), find the listener:
lsof -nP -iTCP:18789 -sTCP:LISTEN
If a manual run is holding the port, stop that process (Ctrl+C). As a last resort, kill the PID you found above.