Xcode 9.2 how to create a new project in an existing workspace

I use Xcode to debug a large C/C++ UNIX project (on Mac OS X). I have a workspace with all of the modules that make up this system as seperate projects.


I've had to move to Xcode 9.2 as I've a got a new laptop with macOS 13.2.


In Xcode 6 I just right clicked in the left pane with all of the projects to add an new external build system (make) project but the right click menu on Xcode 9.2 doesn't give the option of createing a new project in my workspace.


Am I missing something? I'm sure that functionality must still be there somewhere.

Accepted Reply

It's not in the right click pop-menu (hasn't been for a while), but, if you go the the "File" main menu, under "New" you can create a new project, workspace, file, etc.. The "New Project" dialog allow you to attach the project to the workspace (or another workspace, or none at all).


Jonathan

Replies

1) In Xcode, choose File > New > Workspace, or for an existing workspace, move it to the front.

2) Use the same menu for new project.

For existing, make sure the project is closed, then locate the project folder you wish to add, in the Finder, and drag/drop the .xcodeproj file to your workspace - let go/drop when you see the ➕ icon.


That project should then appear in the resource naviagtor in the workspace.


See the Xcode 9 Release Notes for other workspace related details:

https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW1

Post not yet marked as solved Up vote reply of KMT Down vote reply of KMT

It's not in the right click pop-menu (hasn't been for a while), but, if you go the the "File" main menu, under "New" you can create a new project, workspace, file, etc.. The "New Project" dialog allow you to attach the project to the workspace (or another workspace, or none at all).


Jonathan

I'm not sure why they removed the option from the right click menu but I'm finding most Apple software is getting harder to use and not easier.


In the end you have to create a new group then you can do a File->New->Project but you'll have to manually add to the Workspace in the next dialog and you can't leave the project in the root of the project list so you have to add it to your new group. Once finished you can drag it out of the group back to the first level of the list of project as long as you don't try and drag up above the first item as this crashes Xcode.


Thanks for the help.

i thought you could just drag an xode project or workspace into a project navigator and done.