Skip to content

Commit a23ddbc

Browse files
committed
https://bugs.swift.org/browse/SR-2718 Xcode generated projects in custom locations have incorrect path to project in scheme file; causes broken refs to buildables
When using the `--output` option of the `generate-xcodeproj` command line action, the resulting scheme had an incorrect path reference to the location of the project, causing Xcode to not be able to find the referenced targets.
1 parent 55a6cc1 commit a23ddbc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Xcodeproj/generate().swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public func generate(outputDir: AbsolutePath, projectName: String, graph: Packag
7373
/// it has all tests associated so CMD+U works
7474
let schemeName = "\(projectName).xcscheme"
7575
try open(schemesDir.appending(RelativePath(schemeName))) { stream in
76-
xcscheme(container: xcodeprojName, graph: graph, enableCodeCoverage: options.enableCodeCoverage, printer: stream)
76+
xcscheme(container: xcodeprojPath.relative(to: srcroot).asString, graph: graph, enableCodeCoverage: options.enableCodeCoverage, printer: stream)
7777
}
7878

7979
////// we generate this file to ensure our main scheme is listed

0 commit comments

Comments
 (0)