Skip to main content
The boilerplate ships five helper scripts in scripts/. Each is listed below with its real flags and behavior, verified against the script source.

run-tests.sh

Location: scripts/run-tests.sh Test runner with optional coverage measurement. Run from the project root. With no flags it runs the app test target via xcodebuild test against the SwiftAIBoilerplatePro scheme; with --package NAME it runs swift test inside Packages/NAME instead.
Flags:
  • --coverage — Enable code coverage and generate the report
  • --open — Open the HTML coverage report in the browser
  • --package NAME — Test a single package via swift test
  • --verbose — Show detailed xcodebuild output (otherwise piped through xcpretty when available)
  • --help — Show usage and exit
Output (with --coverage, full-app run only):
  • Console test results
  • coverage-report.txt — text summary
  • coverage-report.html — detailed HTML report
The script’s internal COVERAGE_THRESHOLD (85%) only prints a pass/warn line; it does not fail the run. The enforced gate lives in CI (see CI/CD Commands). The full app run uses the Boilerplate.xctestplan workspace test plan, which executes ~598 tests across the 12 package test targets plus the app unit and UI test suites in one pass.

appstore-43-audit.sh

Location: scripts/appstore-43-audit.sh New in v2.2. Builds the app in Release configuration, then runs a strings audit over the main executable and the app-owned bundle, failing the build if any un-rebranded production fingerprint survives. This is the headline App Store Guideline 4.3(a) gate: it stops you from shipping a binary that still looks like the starter template. The risky-string patterns (SwiftAI, Boilerplate, api.example.com, DesignSystem/SAI, and more) are loaded from template.manifest.json so the script, CI, and agent prompts never diverge; an inline fallback list is used only for detached copies.
Beyond the binary scan, it also checks configuration readiness and fails until you:
  • replace the starter BrandConfig.appDisplayName ("App Name"),
  • set production privacyPolicyURLString, termsOfServiceURLString, and subscriptionTermsURLString in BrandConfig,
  • rename the starter app bundle ID by editing APP_BUNDLE_ID (com.berkin.SwiftAIBoilerplatePro) in Config/App.xcconfig — every target’s PRODUCT_BUNDLE_IDENTIFIER derives from it — and
  • remove bundled generic/demo legal/showcase markdown.
It exits non-zero on any blocking app-owned hit and prints PASS: when clean. Override the scheme, destination, or derived-data paths via AUDIT_SCHEME, AUDIT_DESTINATION, AUDIT_DERIVED_DATA, and AUDIT_PACKAGE_CACHE env vars.
The deeper hardening workflow (binary audit, branding/identity map, App Review Notes template, per-module removal) lives in docs/checklists/APP_STORE_4_3_HARDENING.md, with prompt packs in docs/prompts/AppStore4_3Hardening.prompts.md. The matching standalone App Generator that produces a 4.3-safe app from this template is a separate product (coming soon) — see the License & Updates page.

rebrand-design-system-prefix.sh

Location: scripts/rebrand-design-system-prefix.sh New in v2.2. Renames the SAI design-system prefix throughout Packages/DesignSystem — both textual occurrences in .swift/.md files and the SAI*-named source files themselves. Useful for clearing the DesignSystem/SAI fingerprint flagged by the 4.3 audit.
Arguments: OLD_PREFIX (default SAI), NEW_PREFIX (required), MODE (--dry-run default, or --apply). The new prefix must be a Swift-style identifier starting with an uppercase letter.
--apply rewrites files in place. Commit or stash first, then re-run tests and scripts/appstore-43-audit.sh before submitting.

update-config.sh

Location: scripts/update-config.sh Generates SwiftAIBoilerplatePro/Generated/Configuration.swift from Config/Secrets.xcconfig. Run it manually after filling in your keys. Placeholder values containing YOUR are skipped, so a fresh clone still builds and runs with MockAuthClient and EchoLLMClient.
The generated AppConfiguration enum exposes a static let for each configured key and an isConfigured(_:) helper. Recognized keys: SUPABASE_URL, SUPABASE_ANON_KEY, REVENUECAT_API_KEY, RC_ENTITLEMENT_ID, PROXY_BASE_URL, PROXY_PATH, ONESIGNAL_APP_ID. See the Configuration reference for details.
This writes real API keys into a committed-by-default path. Do NOT commit Configuration.swift after running it. Install the pre-commit hook to block accidental commits: git config core.hooksPath .githooks.

validate-template-manifest.sh

Location: scripts/validate-template-manifest.sh New in v2.2. Validates template.manifest.json (the machine-readable single source of truth for identity surface, module graph, config schema, fingerprints, and recipes) against the actual repository.
It checks that:
  • every path referenced by the manifest exists,
  • each module’s manifest-declared dependencies match its Package.swift,
  • the manifest fingerprint list is a superset of the audit script’s fallback list, and
  • each brand anchor resolves to exactly one marked line.
It prints template.manifest.json OK on success or one FAIL: line per problem (exit 1). This runs as the Template Manifest job in CI.

Supabase Scripts

Deploy Edge Function

Run Migrations

Local Development

Xcode Build Scripts

Clean Build

Archive

Run Tests

One xcodebuild test against the scheme runs the whole Boilerplate.xctestplan (all 12 package test targets + the app suites, ~598 tests):

Git Workflows

Pre-commit Checks

The repo ships a pre-commit hook that blocks committing a generated Configuration.swift. Install it once:
Run the same checks CI runs before pushing:
Before an App Store submission, also run the 4.3 audit gate:

Branch Management

Package Management

Update Dependencies

Reset Package Cache

Common Commands

Development

Configuration

Cleaning

CI/CD Commands

GitHub Actions

Workflows in .github/workflows/: Main CI (ci.yml) — runs on push and pull request:
The coverage gate enforces the MINIMUM_COVERAGE env value (currently 25) and fails the build below it; it is computed over product targets only. Coverage Report (coverage-report.yml) — runs weekly (Mondays 09:00 UTC) and on manual dispatch:
Trigger manually:

Quick Reference

Testing Guide

Testing strategies

Deployment

Production deployment

Supabase Setup

Backend deployment

Configuration

Config reference

License & Updates

Pricing, lifetime updates, and the App Generator (coming soon)