Xcode: Dragging a Project to a Workspace shows tin

2020-02-20 06:35发布

问题:

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:

Result:

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

回答1:

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.



标签: xcode macos