Environment:777genius Agent teams ai macOS
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Platform_Packaging |
| Last Updated | 2026-10-22 00:00 GMT |
Overview
macOS platform for building, signing, and notarizing the agent-teams desktop application with Apple notarytool.
Description
macOS is required for building and packaging the macOS distribution of the Electron app. The notarization hook uses `@electron/notarize` with Apple's `notarytool` to submit the app bundle for Apple's automated security scanning. The app must be signed with a specific Apple Team ID (`86399583GS`) and notarized before distribution. Builds support both `darwin-arm64` (Apple Silicon) and `darwin-x64` (Intel) architectures. The app must reside in `/Applications` for auto-update to work.
Usage
Use this environment for the macOS notarization hook implementation and any platform-specific macOS packaging.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | macOS 12+ | Required for notarytool |
| Architecture | darwin-arm64 or darwin-x64 | Both supported as separate builds |
| Xcode | Command line tools | `notarytool` included |
| Signing | Apple Developer certificate | Team ID must be `86399583GS` |
Dependencies
System Packages
- `notarytool` (via Xcode command line tools)
- Apple Developer signing certificate
Node.js Packages
- `@electron/notarize` >= 2.x
- `electron-builder` (packaging)
Credentials
- `APPLE_API_KEY` — App Store Connect API key file path
- `APPLE_API_KEY_ID` — API key identifier
- `APPLE_API_ISSUER` — API issuer ID
- `APPLE_TEAM_ID` — Must be `86399583GS`
Quick Install
# Install Xcode command line tools
xcode-select --install
# Build and package for macOS
pnpm dist:mac:arm64
# Notarization is automatic during packaging if credentials are set
export APPLE_API_KEY=/path/AuthKey.p8
export APPLE_API_KEY_ID=XXXXXXXXXX
export APPLE_API_ISSUER=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Code Evidence
Notarization hook from `scripts/notarize.cjs:1-24`:
const { notarize } = require('@electron/notarize');
exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
if (electronPlatformName !== 'darwin') return;
if (!process.env.APPLE_API_KEY || !process.env.APPLE_API_KEY_ID || !process.env.APPLE_API_ISSUER) {
throw new Error('Apple notarization API credentials are required');
}
if (process.env.APPLE_TEAM_ID !== '86399583GS') {
throw new Error('Unexpected Apple signing team');
}
return await notarize({
tool: 'notarytool',
appBundleId: 'com.agent-teams.app',
appPath: `${appOutDir}/${appName}.app`,
appleApiKey: process.env.APPLE_API_KEY,
appleApiKeyId: process.env.APPLE_API_KEY_ID,
appleApiIssuer: process.env.APPLE_API_ISSUER,
});
};
macOS-specific app behavior from `src/main/index.ts:3221`:
if (process.platform === 'darwin') {
App location check from `src/main/index.ts:3611-3612`:
(process.platform === 'darwin' && app.isInApplicationsFolder())
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `Apple notarization API credentials are required` | Missing env vars | Set `APPLE_API_KEY`, `APPLE_API_KEY_ID`, `APPLE_API_ISSUER` |
| `Unexpected Apple signing team` | Wrong team ID | Must be `86399583GS` |
| Notarization timeout | Apple's servers slow | Retry; notarytool has built-in polling |
Compatibility Notes
- Apple Silicon (arm64): Separate build target; native addons rebuilt for arm64.
- Intel (x64): Separate build target; legacy support.
- Universal binary: Not built; separate per-arch builds instead.
- Auto-update: App must be in `/Applications` folder on macOS.