XCode 16 beta 3 creating a folder instead of a group for all project initial content

When I new project is initiated in XCode 16 beta 3, an overall folder is created to contain all the generated content in the Navigator pane . In past XCode version, this main container (under the project name) has always been generated as a group. Is this change by design or a bug? The issue this creates is that the files and folders in this overall Folder can not be repositioned - they remain in ascending alphabetical order. I must convert this initial Folder into a Group by right clicking on the folder name and selecting "Convert to group" which converts the folder to a group. I am then able to reposition files, groups and folders within this group. I don't see anywhere in the XCode documentation where this change in behavior is mentioned.

Anyone else having this same issue. I never have understood the difference or use cases for groups vs folders in the xcode Navigator pane.

Answered by Developer Tools Engineer in 795641022

We chose to use folders rather than groups for new projects because they can substantially reduce the changes needed to a project when adding and changing source files, since by using folders every source file doesn’t need a direct reference from the project file, and this is how most other environments work these days.

You can always convert the folder to a group if you’d prefer to manage the references to files in your project yourself.

I don't see anywhere in the XCode documentation where this change in behavior is mentioned.

From Xcode Updates > Projects and workspaces :

  • Minimize project file changes and avoid conflicts with buildable folder references. Convert an existing group to a buildable folder with the Convert to Folder context menu item in the Project Navigator. Buildable folders only record the folder path into the project file without enumerating the contained files, minimizing diffs to the project when your team adds or removes files, and avoiding source control conflicts. To use a folder as an opaque copiable resource, the default behavior before Xcode 16, uncheck the Build Folder Contents option in the File Inspector.

  • Create groups with associated folders by default when using the New Group and New Group from Selection commands in the Project Navigator. To create a group without a folder, hold the Option key in the context menu to reveal the New Group without Folder variant of the command.

I never have understood the difference or use cases for groups vs folders in the xcode Navigator pane.

For more information, see Add existing files and folders to a project, Organize project files in the navigator , and Convert groups to folders.

See my comment to last response.

I did read the above docunetaditon. However, there is no explanation as to why a Folder is now being created instead of a Group at initial project build. A folder would be fine if I could manage the position of the files within in. It appears that all I get is alphabetical order. So what I need is the initial project build to create a group linked to a "real" folder at initial project build. Otherwise, I must covert the folder to a group to get the same file management behavior as in xcode 15.

We chose to use folders rather than groups for new projects because they can substantially reduce the changes needed to a project when adding and changing source files, since by using folders every source file doesn’t need a direct reference from the project file, and this is how most other environments work these days.

You can always convert the folder to a group if you’d prefer to manage the references to files in your project yourself.

Great. Thanks for the clarification.

XCode 16 beta 3 creating a folder instead of a group for all project initial content
 
 
Q