Português (Portuguese)
Appearance
Português (Portuguese)
Appearance
Over the years working with different teams and projects, we've identified a set of best practices that we recommend following when working with Tuist and Xcode projects. These practices are not mandatory, but they can help you structure your projects in a way that makes them easier to maintain and scale.
Many organizations use build configurations to model different remote environments (e.g., Debug-Production or Release-Canary), but this approach has some downsides:
Build configurations were designed to embody different build settings, and projects rarely need more than just Debug and Release. The need to model different environments can be achieved differently:
Non-standard configurations
While Tuist supports non-standard configurations and makes them easier to manage compared to vanilla Xcode projects, you'll receive warnings if configurations are not consistent throughout the dependency graph. This helps ensure build reliability and prevents configuration-related issues.
Tuist 4.62.0 added support for buildable folders (Xcode's synchronized groups), a feature introduced in Xcode 16 to reduce merge conflicts.
While Tuist's wildcard patterns (e.g., Sources/**/*.swift) already eliminate merge conflicts in generated projects, buildable folders offer additional benefits:
We recommend adopting buildable folders instead of traditional Target.sources and Target.resources attributes for a more streamlined development experience.
let target = Target(
name: "App",
buildableFolders: ["App/Sources", "App/Resources"]
)let target = Target(
name: "App",
sources: ["App/Sources/**"],
resources: ["App/Resources/**"]
)When installing Swift Package Manager dependencies on CI, we recommend using the --force-resolved-versions flag to ensure deterministic builds:
tuist install --force-resolved-versionsThis flag ensures that dependencies are resolved using the exact versions pinned in Package.resolved, eliminating issues caused by non-determinism in dependency resolution. This is particularly important on CI where reproducible builds are critical.