Hive Hive
Sign in

Tuist Fails to Link Custom Helper-Defined Schemes to Custom Configurations

GitHub issue · Open

Metadata
Source
tuist/tuist #8354
Updated
Jun 11, 2026
Domains
Generated projects
Details

What happened?

Expected Behavior:

I expect ProjectDescriptionHelpers to help me “not repeat myself”. This means that I should be able to define debug, staging, production schemes only once and be able to use them in the appropriate places.

Details:

According to your documentation, this is the method signature for creating a Project:

let project = Project(
name: String,
targets: [Target],
schemes: [Scheme]
)

Therefore, I expect that when this implementation of that signature:

let project = Project.create(
name: "Learn",
destinations: .iOS,
dependencies: [
]
)

is used in conjunction with this implementation of a ProjectDescriptionHelper

extension Project {
public static func create(
name: String,
destinations: Destinations,
dependencies: [TargetDependency]
)-> Project {
let debugScheme = debugScheme(for: name)
let stagingScheme = stagingScheme(for: name)
let productionScheme = productionScheme(for: name)
return Project(
name: name,
options: .options(
automaticSchemesOptions: .disabled
),
targets: [
.target(
name: name,
destinations: destinations,
product: .app,
bundleId: "$(BUNDLE_ID)",
infoPlist: .extendingDefault(with: appInfoPlist),
resources: ["Resources/**"],
buildableFolders: ["Sources"],
dependencies: dependencies,
settings: .settings(configurations: appConfigurations)
)
],
schemes: [debugScheme, stagingScheme, productionScheme]
)
}
private static func debugScheme(for name: String) -> Scheme {
return .scheme(
name: name + "-Debug",
shared: true,
buildAction: .buildAction(targets: ["\(name)"]),
runAction: .runAction(configuration: "Debug")
)
}
private static func stagingScheme(for name: String) -> Scheme {
return .scheme(
name: name + "-Staging",
shared: true,
buildAction: .buildAction(targets: ["\(name)"]),
runAction: .runAction(configuration: "Release-Staging")
)
}
private static func productionScheme(for name: String) -> Scheme {
return .scheme(
name: name + "-Production",
shared: true,
buildAction: .buildAction(targets: ["\(name)"]),
runAction: .runAction(configuration: "Release-Production")
)
}
private static var appConfigurations: [Configuration] {
return [
.debug(
name: "Debug",
xcconfig: .relativeToRoot("Configurations/Debug.xcconfig")
),
.release(
name: "Release-Staging",
xcconfig: .relativeToRoot("Configurations/Staging.xcconfig")
),
.release(
name: "Release-Production",
xcconfig: .relativeToRoot("Configurations/Production.xcconfig")
)
]
}
private static var appInfoPlist: [String: Plist.Value] {
return [
"APP_ENV": "$(APP_ENV",
"APP_NAME": "$(APP_NAME)",
"CFBundleName": "$(APP_NAME)",
"CFBundleDisplayName": "$(BUNDLE_DISPLAY_NAME)",
"UILaunchStoryboardName": "LaunchScreen.storyboard",
"UISupportedInterfaceOrientations~iphone": [
"UIInterfaceOrientationPortrait"
]
]
}
}

an Xcode Project with these 3 schemes

  • Debug,
  • Release-Staging
  • Release-Production

is successfully created.

Current Behavior

When I ran just generate-project, these following errors occur:

  • The build configuration 'Release-Staging' specified in the scheme's run action isn't defined in the project.

  • The build configuration 'Release-Production' specified in the scheme's run action isn't defined in the project.

How do we reproduce it?

Steps To Reproduce:

  • Clone this repo

  • cd into repo dir

  • run just generate-project

Error log

2025-10-01T21:29:20-0400 error dev.tuist.cli : The build configuration 'Release-Staging' specified in the scheme's run action isn't defined in the project.
2025-10-01T21:29:20-0400 error dev.tuist.cli : The build configuration 'Release-Production' specified in the scheme's run action isn't defined in the project.

macOS version

macOS Sequoia 15.5

Tuist version

4.79.7

Xcode version

16.4

Flights

Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.

New Flights are paused Configure model inference, GitHub, and a sandbox provider to start another Flight. Existing results remain available below.
No Flights yet

Start a Flight and preserve its objective, outcome, and session here.

Comments
L
linear[bot] Oct 2, 2025
P
pepicrft Nov 26, 2025

@swiftanon the error mentions that some configurations are missing in the projects that you are referencing from the schemes. Are those configuration present? You define them via the Target.settings and Project.settings attributes.