Hive Hive
Sign in

fix(cli): generate foreign build aggregates as scripts

GitHub issue · Closed

Metadata
Source
tuist/tuist #11030
Updated
Jun 24, 2026
Domains
Generated projects
Details

Resolves N/A

Fixes foreign build aggregate targets leaking native-target generation behavior when a project sets VERSIONING_SYSTEM=apple-generic.

  • Generate aggregate target configs from explicit aggregate settings only and clear VERSIONING_SYSTEM so project-level versioning does not make Xcode treat the aggregate as a versioned product.
  • Stop generating native sources, resources, linking, embed, and build-rule phases for aggregate foreign build targets while preserving pre and post scripts.
  • Add focused generator coverage for the versioning override and script-only phase generation.

How to test locally

  • tuist generate TuistGeneratorTests tuist ProjectDescription --no-open
  • xcodebuild test -workspace Tuist.xcworkspace -scheme TuistUnitTests -only-testing TuistGeneratorTests/ConfigGeneratorTests/generateTargetConfig_whenAggregateTarget_clearsVersioningSystem -only-testing TuistGeneratorTests/TargetGeneratorTests/generateTarget_whenAggregateTarget_generatesOnlyScriptPhases CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
  • xcodebuild build -workspace Tuist.xcworkspace -scheme tuist CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
  • Regenerated the provided foreign-build sample with the local tuist binary and reran the failing Xcode build. The duplicate-output error is gone and the build advances to the sample Gradle wrapper checksum failure.
  • git diff --check
Comments
TA
tuist-atlas[bot] Jun 4, 2026

The fix for foreign build aggregate targets with VERSIONING_SYSTEM=apple-generic is now available in 4.195.16. Update to this version to get the fix.