- App code:
Stitch/(Swift, SwiftUI). Extension:StitchQuickLookExtension/. - Tests:
StitchTests/(XCTest). Mirror the source layout; use*Tests.swift. - Docs and assets:
Guides/,README_Assets/,public/. - CI helpers:
ci_scripts/(e.g.,ci_pre_xcodebuild.shwritessecrets.json). - Xcode project:
Stitch.xcodeproj, test plan:Stitch.xctestplan.
- Open in Xcode: open
Stitch.xcodeproj, select theStitchscheme, run. - CLI build (Debug macOS):
xcodebuild -scheme Stitch -configuration Debug build. - Run tests (macOS):
xcodebuild -scheme Stitch -destination 'platform=macOS' test. - Run tests (iOS sim):
xcodebuild -scheme Stitch -destination 'platform=iOS Simulator,name=iPhone 15' test. - Lint Swift:
swiftlint(install via Homebrew). Config lives in.swiftlint.yml.
- Swift style enforced by SwiftLint. Key rules:
line_length: 120,vertical_whitespace: 2; several complexity rules are disabled to favor iteration. - Use 4-space indentation; Unix line endings; UTF-8.
- Names: Types
UpperCamelCase, methods/propertieslowerCamelCase, constantslowerCamelCase. - SwiftUI: prefer explicit
.positionvs.offsetconsistently when laying out views.
- Framework: XCTest. Derive from
XCTestCase; test methods start withtest. - File naming:
FeatureNameTests.swift; keep focused, deterministic tests. - Location: add new tests under
StitchTests/mirroring source folders. - Run locally with Xcode or
xcodebuild ... test(examples above).
- Commits: present tense, concise, describe intent. Include PR reference like
(#123)when applicable.- Examples:
Fix crash on empty graph,Handle .overlay views in parser (#1630).
- Examples:
- PRs: clear description, what/why, linked issues, steps to test, screenshots or clips for UI changes.
- Keep changes scoped; update docs (
Guides/,README.md) and tests when behavior changes.
- Do not commit secrets. In CI,
ci_scripts/ci_pre_xcodebuild.shwritessecrets.jsonfrom environment variables. - For local development, you may create a local
secrets.json; never push real keys. - Update bundle IDs and Development Team for both
StitchandStitchQuickLookExtensiontargets; enable CloudKit per README.