Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode: Dragging a Project to a Workspace shows tiny .xcodeproj file in Project Navigator. What's wrong?

Tags:

xcode

macos

Setup:

Xcode 4.3.1 (or 5.x)
OS X 10.7.3

I have reproduced this issue on two separate late-model Macs with this setup.

Steps:

  1. Create a new Mac "Cocoa Application" Xcode Project. File > New > Project… Name it "MyApp".
  2. Create a new Workspace: File > New > Workspace… Name it "MySuite".
  3. Drag MyApp.xcodeproj file from the Finder into the Project Navigator of "MySuite" Workspace.

Expected:
The Project Navigator of the "MySuite" Workspace should now show a full sub-Project for "MyApp" with Source, Targets, etc.

Actual:
"MySuite" Workspace Project Navigator shows a tiny MyApp.xcodeproj item in the Project Navigator. (see screenshots)


Dragging:

Dragging MyApp.xcodeproj to the Workspace

Result:

Result

What am I doing wrong in trying to add a Project to a Workspace?

like image 421
Todd Ditchendorf Avatar asked Mar 11 '12 18:03

Todd Ditchendorf


People also ask

What is the difference between workspace and project in Xcode?

Workspaces Extend the Scope of Your Workflow Although a project can contain references to other projects, working on interrelated projects in Xcode 3 is complicated; most workflows are confined to a single project.

What is Project Navigator in Xcode?

The Project navigator displays your project's files and lets you open, add, delete, and rearrange those files. To open the Project navigator, at the top of your project window's navigator area, click the icon that resembles a file folder.


1 Answers

Be sure you don't have the project already open in another window. Xcode only lets you open a project one time. I've made this mistake a lot when working on a framework then trying to add it to an application.

Simply close the project you're trying to drag in's window and everything will be happy.

like image 105
Sam Soffes Avatar answered Oct 25 '22 10:10

Sam Soffes