From fd3c903595938acf518e56fd4b1597004b5057da Mon Sep 17 00:00:00 2001 From: Yonas Kolb Date: Fri, 6 Apr 2018 08:38:26 +1000 Subject: [PATCH] fixed build phase of `none` not being applied to folders --- Sources/XcodeGenKit/SourceGenerator.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index 79a11ac7..ec7b18bd 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -422,8 +422,15 @@ class SourceGenerator { if !createIntermediateGroups { rootGroups.insert(fileReference) } + + let buildPhase: BuildPhase? + if let targetBuildPhase = targetSource.buildPhase { + buildPhase = targetBuildPhase.buildPhase + } else { + buildPhase = .resources + } - let sourceFile = generateSourceFile(targetSource: targetSource, path: folderPath, buildPhase: targetSource.buildPhase?.buildPhase ?? .resources) + let sourceFile = generateSourceFile(targetSource: targetSource, path: folderPath, buildPhase: buildPhase) sourceFiles.append(sourceFile) sourceReference = fileReference