Xcode:将项目拖到工作区会在Project Navigator中显示一个很小的.xcodeproj文件.怎么了? [英] Xcode: Dragging a Project to a Workspace shows tiny .xcodeproj file in Project Navigator. What's wrong?
问题描述
设置:
Xcode 4.3.1(或5.x)
OS X 10.7.3
Xcode 4.3.1 (or 5.x)
OS X 10.7.3
我已使用此设置在两台单独的最新型号Mac上重现了此问题.
I have reproduced this issue on two separate late-model Macs with this setup.
步骤:
- 创建一个新的Mac"Cocoa Application" Xcode项目.
File > New > Project…
将其命名为"MyApp". - 创建一个新的工作区:
File > New > Workspace…
将其命名为"MySuite". - 将
MyApp.xcodeproj
文件从Finder拖到"MySuite"工作区的项目导航器中.
- Create a new Mac "Cocoa Application" Xcode Project.
File > New > Project…
Name it "MyApp". - Create a new Workspace:
File > New > Workspace…
Name it "MySuite". - Drag
MyApp.xcodeproj
file from the Finder into the Project Navigator of "MySuite" Workspace.
预期:
现在,"MySuite"工作区的项目导航器应显示带有源,目标等的"MyApp"的完整子项目.
Expected:
The Project Navigator of the "MySuite" Workspace should now show a full sub-Project for "MyApp" with Source, Targets, etc.
实际:
"MySuite"工作区项目浏览器在项目浏览器中显示了一个很小的MyApp.xcodeproj
项目. (请参见屏幕截图)
Actual:
"MySuite" Workspace Project Navigator shows a tiny MyApp.xcodeproj
item in the Project Navigator. (see screenshots)
拖动:
结果:
尝试将项目添加到工作区时我做错了什么?
What am I doing wrong in trying to add a Project to a Workspace?
推荐答案
请确保您尚未在另一个窗口中打开该项目. Xcode仅允许您一次打开一个项目.在使用框架然后尝试将其添加到应用程序中时,我犯了很多错误.
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:将项目拖到工作区会在Project Navigator中显示一个很小的.xcodeproj文件.怎么了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!