From a23ddbccc6fb397277554f6d3acaff6de1ec9649 Mon Sep 17 00:00:00 2001 From: Anders Bertelrud Date: Mon, 26 Sep 2016 12:12:00 -0700 Subject: [PATCH] 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. --- Sources/Xcodeproj/generate().swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Xcodeproj/generate().swift b/Sources/Xcodeproj/generate().swift index 7aa58b599e7..75d9ecbc214 100644 --- a/Sources/Xcodeproj/generate().swift +++ b/Sources/Xcodeproj/generate().swift @@ -73,7 +73,7 @@ public func generate(outputDir: AbsolutePath, projectName: String, graph: Packag /// it has all tests associated so CMD+U works let schemeName = "\(projectName).xcscheme" try open(schemesDir.appending(RelativePath(schemeName))) { stream in - xcscheme(container: xcodeprojName, graph: graph, enableCodeCoverage: options.enableCodeCoverage, printer: stream) + xcscheme(container: xcodeprojPath.relative(to: srcroot).asString, graph: graph, enableCodeCoverage: options.enableCodeCoverage, printer: stream) } ////// we generate this file to ensure our main scheme is listed