Skip to content

Apple Developer 登録 + notarization で Gatekeeper 警告を消す #188

@shomatan

Description

@shomatan

Epic: #184

背景

PR #178 で macOS .app 版を導入したが 未署名配布 (`electron-builder.yml` の `identity: null`)。これにより:

  • ダウンロード後の初回起動で `\".app\" は壊れているため開けません` または `開発元未確認` の Gatekeeper 警告
  • `xattr -d com.apple.quarantine` または右クリック → 開くを要求
  • これは非エンジニア向けには事実上ブロッカー

Epic #184 のフル同梱化が完成しても、ここを抜けないと配布として成立しない。

やること

1. Apple Developer Program 登録

  • $99/年 (個人 or 組織)
  • 議論ポイント: 個人名義 vs 組織名義 (ignission GitHub org の運営者として誰の Apple ID 紐付けにするか)
  • 議論ポイント: OSS プロジェクトとしての透明性 vs 個人情報の取り扱い

2. Developer ID Application 証明書取得

  • Apple Developer Account から "Developer ID Application" 証明書を発行
  • p12 形式 export → GitHub Secret に `CSC_LINK` + `CSC_KEY_PASSWORD` として登録
  • 期限管理: 5 年で expire、更新運用ドキュメント整備

3. electron-builder の署名有効化

  • `packages/desktop/electron-builder.yml` の `identity: null` 削除、`gatekeeperAssess: false` も削除
  • `hardenedRuntime: true` を追加 (notarization の前提)
  • `entitlements` / `entitlementsInherit` の plist を `build-assets/` に配置
    • JIT 必要 (V8) なので `com.apple.security.cs.allow-jit` 等

4. Notarization workflow

  • `@electron/notarize` を `electron-builder` の `afterSign` hook に組み込む
  • App-specific password を Apple ID で発行 → `APPLE_ID` + `APPLE_APP_SPECIFIC_PASSWORD` を GitHub Secret 登録
  • もしくは API Key 方式 (`APPLE_API_KEY_ID`, `APPLE_API_KEY_ISSUER_ID`, `APPLE_API_KEY` を Secret)
  • notarize 後の staple も自動化

5. release smoke の更新

PR #182 で追加した release smoke step が xattr 削除なしで起動するか確認:

  • notarized .app は `xattr -dr com.apple.quarantine` 不要
  • 既存の `open Ark.app` パスが Gatekeeper 警告なしで通ること
  • (release.yml の smoke は GHA runner で実行されるので quarantine が付かない可能性もある。実 mac 実機 distribution での挙動が本質)

コストと意思決定

  • 年 $99 (証明書) + 運用工数 (証明書更新、Apple Account 管理、notarize 失敗時のトラブルシュート)
  • alternative: 未署名のまま "右クリック → 開く" の手順を README で明示
    • 非エンジニア向けには許容不可だが、開発者向け配布なら回避可能

意思決定は本 Epic の優先順位と Ark の target user (誰に届けるか) 次第。

スコープ外

  • Mac App Store 配布 (sandbox 必須、tmux/ttyd 同梱経路が厳しい)
  • TestFlight (mac 向けは限定的)
  • Windows EV Code Signing (~$300-500/年) は別 Epic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions