Context
While building a SwiftUI macOS app on top of scaffold_macos_project, every new Swift source file required a separate mcp__xc-project__add_file call to wire it into the .pbxproj before the build would pick it up. With Xcode 16+'s PBXFileSystemSynchronizedRootGroup, files added to a folder on disk are automatically included in the build — no project file edits required.
Problem
The Xcode/Lyrico.xcodeproj/project.pbxproj produced by scaffold_macos_project uses traditional PBXGroup + PBXFileReference + PBXSourcesBuildPhase entries (objectVersion = 60). Adding a new Foo.swift to the source folder doesn't compile until add_file is called.
For an LLM agent driving the project, this means:
- Two-step file creation (Write + add_file MCP)
- Easy to forget the second step → surprising "file not found in target" errors
- Project file churn for every new source file
Proposal
Default scaffolds (both scaffold_macos_project and scaffold_ios_project) to objectVersion = 100 with PBXFileSystemSynchronizedRootGroup for the app's source folder (and a synchronized test folder if generated). Tracking issue #282 already covers parsing/maintaining objectVersion 100 projects — this is the scaffold-side counterpart so newly created projects benefit by default.
Add a use_synchronized_folders flag (default true) to opt back into the legacy layout if needed.
Acceptance criteria
Related
👾 This issue is managed by Jig. Edits made here will be overwritten.
Context
While building a SwiftUI macOS app on top of
scaffold_macos_project, every new Swift source file required a separatemcp__xc-project__add_filecall to wire it into the .pbxproj before the build would pick it up. With Xcode 16+'sPBXFileSystemSynchronizedRootGroup, files added to a folder on disk are automatically included in the build — no project file edits required.Problem
The
Xcode/Lyrico.xcodeproj/project.pbxprojproduced byscaffold_macos_projectuses traditionalPBXGroup+PBXFileReference+PBXSourcesBuildPhaseentries (objectVersion = 60). Adding a newFoo.swiftto the source folder doesn't compile untiladd_fileis called.For an LLM agent driving the project, this means:
Proposal
Default scaffolds (both
scaffold_macos_projectandscaffold_ios_project) toobjectVersion = 100withPBXFileSystemSynchronizedRootGroupfor the app's source folder (and a synchronized test folder if generated). Tracking issue #282 already covers parsing/maintaining objectVersion 100 projects — this is the scaffold-side counterpart so newly created projects benefit by default.Add a
use_synchronized_foldersflag (defaulttrue) to opt back into the legacy layout if needed.Acceptance criteria
scaffold_macos_projectemits a project where the app source folder is aPBXFileSystemSynchronizedRootGroupscaffold_ios_projectdoes the same.swiftfiles in the synchronized folder build into the target without anadd_filecalladd_filestill works as a no-op (or warns) when the destination is already inside a synchronized folderRelated
👾 This issue is managed by Jig. Edits made here will be overwritten.