Project Navigator Broken in Xcode 16? Drag and Drop to Reorder Files Doesn't Work. "New Groups" Creates New Folders.

I just created a new project in the newest version of Xcode as a sample project for a feedback.

Bug 1

So simply what I do in every new project is create a "Supporting Files" group (not a folder because I don't want to move these files on the file system). I put the following files in this group:

  • .entitlements file

-the Info.plist (which apparently new projects don't create anymore because I don't see one).

  • main.m
  • Assets.xcassets

In previous version of Xcode this was done with the "New Group without Folder" action (though back in the day I believe you'd get yellow folders in "New Group" and blue folder with 'New Folder" and they were separate actions.... which was actually better and much less insane IMO but that's not really important to this).

In any case, "New Group without Folder" is nowhere to be found in the context menu. I finally was able to get "New Group" to appear as long as I wasn't right clicking underneath any directory. But.... New Group actually creates a New Folder, just like New Folder. So I put the .entitlements in the Supporting Files group (which is not a group, but a directory) and the app won't compile unless I fix the path in project settings because I moved the file which is most definitely not what I wanted.

So we can no longer group files in the project navigator without moving them to new directories? Is this intentional behavior? It can't be, right?

Bug 2

I noticed dragging and dropping to reorder files in the project navigator no longer seems to work? In previous versions of Xcode I could drag and drop to reorder files (in groups and in folders, this would work). This appears to no longer work. I just have to accept the way Xcode orders my project files?

Workaround:

In New Xcode Project....delete the top level blue folder (the parent folder that contains AppDelegate.m, etc.) and all starter files. When deleting choose Remove References only.

Then drag and drop the folder back into your Xcode project. Choose for Action-> Reference Files in place. Choose for Groups -> Create Groups (not folder references).

Once you have a "Group Reference" you can drag and drop reorder, create new groups without folders, etc. just like you could before.

Why does a new Xcode project create a folder reference in the project navigator now by default instead of a group? This must be considered a bug?

FB15195096

FB15209556

Okay so after going through the Xcode release notes I found this bit:

"The Project Navigator now defaults to creating groups with associated folders when using the “New Group” and “New Group from Selection” commands. To create a group without a folder, hold option in the context menu to reveal the “New Group without Folder” variant of the command. (127396845)"

New Group is nowhere to be found at all when there is a selection underneath an expanded blue folder in the navigator though (even if you right click on the background). You have to move the selection up to the top level to get "New Group" to show up in the context menu (and then I can hold down option key to get "New Group without Folder"). So in the case of a brand new project you have to move the selection up to the top (where you would go to edit build settings) then right click the background to get "New Group (without folder)" THEN I can create a "Supporting Files" group without a folder.

However this all appears to be very buggy. After moving the .entitlements to the new group (with no folder) it still actually moves the file to the root directory next to the.xcodeproject file.

In a brand new Xcode project the top level folder that contains all the starting files like the App Delegate is blue (not gray). Files cannot be reordered via drag and drop. When I right click on any file like AppDelegate.m there is no "New Group from Selection" option. There is only "New Folder from Selection". I thus cannot create a "New Group without Folder" or reorder any of the files in a starter Xcode project without actually moving the files....

Accepted Answer

Workaround:

In New Xcode Project....delete the top level blue folder (the parent folder that contains AppDelegate.m, etc.) and all starter files. When deleting choose Remove References only.

Then drag and drop the folder back into your Xcode project. Choose for Action-> Reference Files in place. Choose for Groups -> Create Groups (not folder references).

Once you have a "Group Reference" you can drag and drop reorder, create new groups without folders, etc. just like you could before.

Why does a new Xcode project create a folder reference in the project navigator now by default instead of a group? This must be considered a bug?

Workaround: In New Xcode Project....delete the top level blue folder (the parent folder that contains AppDelegate.m, etc.) and all starter files. When deleting choose Remove References only. Then drag and drop the folder back into your Xcode project. Choose for Action-> Reference Files in place. Choose for Groups -> Create Groups (not folder references). Once you have a "Group Reference" you can drag and drop reorder, create new groups without folders, etc. just like you could before.

Actually a better way to get desired behavior is to right click on the folder and choose "Convert to Group." I'm not sure why this change was made but I'd always want a "Group" over a "Folder" so I can reorder right in Xcode.

Project Navigator Broken in Xcode 16? Drag and Drop to Reorder Files Doesn't Work. "New Groups" Creates New Folders.
 
 
Q