feat: add App Store build variant with APPSTORE flag#29
Merged
Conversation
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.
Reduces SettingsView.swift below 600-line SwiftLint limit.
b7b3e2e to
24b18ca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#if APPSTOREconditional compilation for Claude CLI exclusion#if !APPSTOREswift build -Xswiftc -DAPPSTORE+swift test)Test plan
swift buildpasses (Homebrew variant)swift build -Xswiftc -DAPPSTOREpasses (App Store variant)