- Keep each sample's sources, tests, and Apple entry point under
Samples/<Name>/Sources,Tests, andApple. - Each sample declares a
Project.swiftwithProject.sample(...). Keep shared project and dependency logic inTuist/ProjectDescriptionHelpers, the workspace in the rootWorkspace.swift, and shared environment selections inmise.toml. SAMPLEselects an app;MISE_ENVselects its renderer and dependencies.DESTINATIONuses Xcode syntax for both build and run targets. Usesimctlfor simulators anddevicectlfor physical devices; keep signing teams configurable.- The Makefile and run script discover samples from
Samples/*/Project.swift. Match the directory name to the project name and use<Name>Appfor its scheme. - When adding a sample, add its
Project.swiftand update the README sample list.
- Keep all environment selections in
mise.toml. See OpenSwiftUI integration for supported combinations. - The default mise configuration is remote OpenSwiftUI source with AttributeGraph.
sui,osui-source, andosui-binaryare mutually exclusive, as areagandcompute. Onlyosui-sourceaccepts backend andlocaloptions. - Select modes with
MISE_ENV, rather than exporting individualOPENSWIFTUI*flags. The templates set the renderer, local dependencies, AttributeGraph, and Compute flags, and reject invalid combinations. Compute always builds from source. - Run commands from the repository root with
mise exec --. Interactive shells configured witheval "$(mise activate zsh)"can omit this prefix. - After changing dependency configuration, run
tuist cleanfollowed bytuist generate --no-openfrom the repository root in the same mise environment.mise installinstalls tools; it does not clear Tuist state or resolve Swift packages.tuist generateresolves package dependencies. - Use the workspace's root
.buildDerivedData location so explicit SDK stub references match native SwiftPM paths. If generation reports unresolved stubs, clean and generate again after package resolution, before building. - Xcode must inherit the selected environment when it starts. Scheme launch variables do not configure package manifest evaluation.
- For configuration changes, check valid combinations, invalid combinations, and replacement of environment values left by a previous selection.
- A successful app build alone does not verify the OpenSwiftUI backend. Check
that the build graph includes OpenSwiftUI and that the selected sample defines the
OpenSwiftUIcompilation condition before reporting backend validation. - For documentation-only changes, check the diff and relative links; do not regenerate or build the project.
- For Apple run script changes, run
python3 -B -m unittest discover -s Scripts/tests.