Skip to content

feat: add App Store build variant with APPSTORE flag#29

Merged
pasrom merged 6 commits intomainfrom
feat/appstore-build-variant
Mar 16, 2026
Merged

feat: add App Store build variant with APPSTORE flag#29
pasrom merged 6 commits intomainfrom
feat/appstore-build-variant

Conversation

@pasrom
Copy link
Copy Markdown
Owner

@pasrom pasrom commented Mar 16, 2026

Summary

  • Add sandbox entitlements and #if APPSTORE conditional compilation for Claude CLI exclusion
  • Guard CLI-specific tests behind #if !APPSTORE
  • Add App Store build variant to CI matrix (swift build -Xswiftc -DAPPSTORE + swift test)
  • Document build variants in CLAUDE.md

Test plan

  • swift build passes (Homebrew variant)
  • swift build -Xswiftc -DAPPSTORE passes (App Store variant)
  • 497 tests pass
  • Lint clean (1 pre-existing warning)

pasrom added 5 commits March 16, 2026 21:28
What: Extract inline entitlements into dedicated files and add
--appstore build variant support.

- Homebrew.entitlements: mic only (same as before, moved to file)
- AppStore.entitlements: sandbox + mic + network + file picker
- --appstore flag passes -Xswiftc -DAPPSTORE and selects AppStore
  entitlements; uses bash array for SWIFT_BUILD_FLAGS
What: Create two build variants — Homebrew (with Claude CLI) and
App Store (sandbox-safe, OpenAI API only).

- Extract all CLI code into ClaudeCLIProtocolGenerator.swift wrapped
  in a single top-level #if !APPSTORE
- Clean ProtocolGenerator.swift to shared-only code (prompts, file I/O)
- Guard .claudeCLI enum case, claudeBin property, default provider
  in AppSettings.swift
- Guard .claudeCLI switch case in MeetingTranscriberApp.swift
- Guard claudeBinaries state and CLI picker in SettingsView.swift
- ProtocolError retains #if !APPSTORE for CLI error cases (enum cases
  cannot be added via extension)

CaseIterable synthesizes allCases from compiled cases only, so the
provider Picker automatically excludes claudeCLI in APPSTORE builds.
UserDefaults migration: "claudeCLI" rawValue → nil → fallback to
.openAICompatible — no migration code needed.
Wrap CLI-specific tests (claudeBin, available binaries, env stripping,
stream JSON parsing, Claude CLI picker) so they are excluded from the
App Store test suite. Default provider assertion adapts per build.

Homebrew: 497 tests, App Store: 483 tests — all pass.
Run swift test for both homebrew and appstore (-DAPPSTORE) variants
in parallel. Separate cache keys per variant.
@github-actions github-actions bot added the enhancement New feature or request label Mar 16, 2026
Reduces SettingsView.swift below 600-line SwiftLint limit.
@pasrom pasrom force-pushed the feat/appstore-build-variant branch from b7b3e2e to 24b18ca Compare March 16, 2026 20:43
@pasrom pasrom merged commit 0347b9a into main Mar 16, 2026
5 checks passed
@pasrom pasrom deleted the feat/appstore-build-variant branch March 16, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant