scripts/. Each is listed below with its real flags and behavior, verified against the script source.
| Script | Purpose |
|---|---|
run-tests.sh | Test runner with coverage measurement |
appstore-43-audit.sh | App Store Guideline 4.3(a) Release-binary audit gate (new in v2.2) |
rebrand-design-system-prefix.sh | Rename the SAI design-system prefix (new in v2.2) |
update-config.sh | Generate Configuration.swift from Secrets.xcconfig |
validate-template-manifest.sh | Validate template.manifest.json against the repo (new in v2.2) |
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.
- Basic Usage
- Package Testing
- Verbose
--coverage— Enable code coverage and generate the report--open— Open the HTML coverage report in the browser--package NAME— Test a single package viaswift test--verbose— Show detailedxcodebuildoutput (otherwise piped throughxcprettywhen available)--help— Show usage and exit
--coverage, full-app run only):
- Console test results
coverage-report.txt— text summarycoverage-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.
- replace the starter
BrandConfig.appDisplayName("App Name"), - set production
privacyPolicyURLString,termsOfServiceURLString, andsubscriptionTermsURLStringinBrandConfig, - rename the starter app bundle ID by editing
APP_BUNDLE_ID(com.berkin.SwiftAIBoilerplatePro) inConfig/App.xcconfig— every target’sPRODUCT_BUNDLE_IDENTIFIERderives from it — and - remove bundled generic/demo legal/showcase markdown.
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.
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.
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.
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.
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.
- 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.
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
Onexcodebuild 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 generatedConfiguration.swift. Install it once:
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:
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:
Quick Reference
Run Tests Locally
Run Tests Locally
Deploy Backend
Deploy Backend
Clean Everything
Clean Everything
Check Coverage
Check Coverage
App Store 4.3 Pre-submission Audit
App Store 4.3 Pre-submission Audit
Related Resources
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)
