Skip to content

Commit 71f8e57

Browse files
Rely on fileReference instead of adding new synchronizedRootGroup (#1557)
1 parent e9ebafd commit 71f8e57

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Sources/XcodeGenKit/PBXProjGenerator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1456,7 +1456,7 @@ public class PBXProjGenerator {
14561456
}
14571457

14581458
// add fileSystemSynchronizedGroups
1459-
let synchronizedRootGroups = sourceFiles.compactMap { $0.synchronizedRootGroup }
1459+
let synchronizedRootGroups = sourceFiles.compactMap { $0.fileReference as? PBXFileSystemSynchronizedRootGroup }
14601460
if !synchronizedRootGroups.isEmpty {
14611461
targetObject.fileSystemSynchronizedGroups = synchronizedRootGroups
14621462
}

Sources/XcodeGenKit/SourceGenerator.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ struct SourceFile {
99
let fileReference: PBXFileElement
1010
let buildFile: PBXBuildFile
1111
let buildPhase: BuildPhaseSpec?
12-
var synchronizedRootGroup: PBXFileSystemSynchronizedRootGroup?
1312
}
1413

1514
class SourceGenerator {
@@ -706,14 +705,13 @@ class SourceGenerator {
706705
// TODO: adjust if hasCustomParent == true
707706
rootGroups.insert(syncedRootGroup)
708707

709-
var sourceFile = generateSourceFile(
708+
let sourceFile = generateSourceFile(
710709
targetType: targetType,
711710
targetSource: targetSource,
712711
path: path,
713712
fileReference: syncedRootGroup,
714713
buildPhases: buildPhases
715714
)
716-
sourceFile.synchronizedRootGroup = syncedRootGroup
717715
sourceFiles.append(sourceFile)
718716
}
719717

0 commit comments

Comments
 (0)