In Xcode 5, it auto-selects the default folder on disk to match to the project folder in the sidebar for certain folders, and it is possible to manually establish this linkage.
In my project, I have sidebar groups for AppName
, AppNameTests
, and one I created myself called Shared Components
. When I select the AppName
group in the sidebar and create a class, the Save dialog automatically drills into the AppName
subdirectory inside the top-level AppName
folder on disk, and does the same for classes created inside AppNameTests
.
I was unable to get Xcode to mimic this behaviour with my custom Shared Components
sidebar group, despite having a Shared Components
folder on disk, but I figured out how to coerce it!
Xcode simply needed to know that the on-disk folder was what my sidebar group was all about. To do that:
- Open your project's folder up in the Finder
- Drag the folder you'd like linked into the sidebar into the project organizer.
- When Xcode presents its "Add Files" dialog, select "Create groups for any added folders". (These are the dialog options I selected:

Now, when I select this sidebar group and create a file, the Save dialog starts in the folder I dragged into the project sidebar. Victory!
Edit: I discovered the keys that Xcode uses in the project.pbxproj
file for this: if you change a folder's name
key to path
, i.e.
path = "Shared Components";
that's basically what Xcode is doing when you add a folder to the project as a group reference. (You can also use both name
and path
keys if you want the sidebar name
to be different than the on-disk path
.)