Skip to content

Conversation

@mirkokg
Copy link

@mirkokg mirkokg commented Nov 20, 2025

Adds logic to detect and register membership exceptions for PBXFileSystemSynchronizedRootGroup objects, specifically excluding Info.plist files from group membership when necessary. Also ensures resources build phase is added if synchronized root groups are present.

I noticed that current implementation of synchronizedGroups does not ignore Info.plist.
I inspected default Xcode behavior and noticed that when you create new Xcode project you get empty copy Resources section:

/* Begin PBXResourcesBuildPhase section */
		232C80EF2ECFA3E300DF1D84 /* Resources */ = {
			isa = PBXResourcesBuildPhase;
			buildActionMask = 2147483647;
			files = (
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXResourcesBuildPhase section */

If this empty PBXResourcesBuildPhase is not present xcassets will not be copied automatically for syncedFolder.

I also noticed that by default it adds Info.plist to ignore list as PBXFileSystemSynchronizedBuildFileExceptionSet:

/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
		232C81032ECFA3E400DF1D84 /* Exceptions for "tester" folder in "tester" target */ = {
			isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
			membershipExceptions = (
				Info.plist,
			);
			target = 232C80F02ECFA3E300DF1D84 /* tester */;
		};
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */

There are three functionalities implemented with this patch:

  • Allows you to add excludes for syncedFolder
  • Adds exclude for Info.plist if its within the syncedFolder
  • Adds empty copy resources build phase for resources to be copied

This patch fixes an issue with synchronized folders reported by @KieranHarper :

#1586

Adds logic to detect and register membership exceptions for PBXFileSystemSynchronizedRootGroup objects, specifically excluding Info.plist files from group membership when necessary. Also ensures resources build phase is added if synchronized root groups are present.
@mirkokg
Copy link
Author

mirkokg commented Nov 21, 2025

I also created a PR to fix TEMP_ prefixes for PBXFileSystemSynchronizedBuildFileExceptionSet tuist/XcodeProj#1014 in Xcodeproj, but besides cosmetic problem this issue does not affect XcodeGen negatively.

@mirkokg
Copy link
Author

mirkokg commented Nov 26, 2025

@yonaskolb please review and let me know if you would change anything. I tested with my projects and all worked perfectly with my version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant