{"record":{"id":"9e4f8442729631cc","repo":"ComposioHQ/composio","slug":"building-beeper-imessage-local-tool-binaries-requi","errorCode":null,"errorMessage":"Building Beeper iMessage local-tool binaries requires macOS and the Swift toolchain.","messagePattern":"Building Beeper iMessage local-tool binaries requires macOS and the Swift toolchain\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ts/packages/cli-local-tools/scripts/build-beeper-imessage-binaries.ts","lineNumber":66,"sourceCode":"  'Accessibility+Value.swift',\n] as const;\n\nconst betterSwiftAxConstantReferencePattern =\n  /\\bkAX[A-Za-z0-9]+(?:Action|ParameterizedAttribute|Attribute|Notification|Subrole|Role|Value)\\b/g;\nconst betterSwiftAxConstantPattern =\n  /^kAX(.+?)(Action|ParameterizedAttribute|Attribute|Notification|Subrole|Role|Value)$/;\n\nconst betterSwiftAxConstantLiteral = (constantName: string): string => {\n  const match = betterSwiftAxConstantPattern.exec(constantName);\n  if (!match) {\n    throw new Error(`Unsupported BetterSwiftAX constant fallback: ${constantName}`);\n  }\n  return `\"AX${match[1]}\"`;\n};\n\nconst ensurePlatform = () => {\n  if (process.platform !== 'darwin') {\n    throw new Error(\n      'Building Beeper iMessage local-tool binaries requires macOS and the Swift toolchain.'\n    );\n  }\n};\n\nconst ensureSubmodule = async () => {\n  if (await exists(path.join(submodulePath, 'Package.swift'))) return;\n\n  console.log(`Initializing ${submoduleRelativePath} submodule...`);\n  await $`git submodule update --init --recursive -- ${submoduleRelativePath}`.cwd(repoRoot);\n\n  if (!(await exists(path.join(submodulePath, 'Package.swift')))) {\n    throw new Error(\n      `Missing platform-imessage submodule at ${submoduleRelativePath}. Run: git submodule update --init --recursive -- ${submoduleRelativePath}`\n    );\n  }\n};\n","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/ComposioHQ/composio/blob/64b1b85502b1beeb2379e6c9e8bf1104504fa637/ts/packages/cli-local-tools/scripts/build-beeper-imessage-binaries.ts#L48-L84","documentation":"The build script compiles Swift imessage-cli binaries using macOS-only tooling (swift build, the Accessibility APIs). It hard-fails on any non-darwin platform so Linux/Windows CI doesn't produce confusing downstream errors.","triggerScenarios":"Running scripts/build-beeper-imessage-binaries.ts with process.platform !== 'darwin' (Linux or Windows).","commonSituations":"Generic Linux CI pipelines that run all package scripts; contributors on Linux/Windows trying to build the full local-tools workspace.","solutions":["Run the script on a Mac with Xcode/Swift installed (check with `swift --version`).","Skip/gate the script in CI behind a macOS runner or an `process.platform === 'darwin'` condition."],"exampleFix":"// package.json / CI\n\"scripts\": { \"build:imessage\": \"node -e \\\"if (process.platform==='darwin') require('./scripts/build-beeper-imessage-binaries.ts') \\\"\" }","handlingStrategy":"validation","validationCode":"if (process.platform !== 'darwin') {\n  console.warn('Skipping Beeper iMessage binary build (requires macOS).');\n  process.exit(0);\n}","typeGuard":"const isDarwin = (p: NodeJS.Platform): boolean => p === 'darwin';","tryCatchPattern":null,"preventionTips":["Gate platform-specific build scripts in package.json with an inline platform check.","Use macOS runners in CI for any job that builds Swift binaries."],"tags":["build-script","platform-support","macos","swift"],"backgroundTag":"platform-not-supported","analyzedSha":"64b1b85502b1beeb2379e6c9e8bf1104504fa637","analyzedAt":"2026-08-28T15:39:33.623Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}