在 Xcode 4 中将项目添加到工作区的问题 [英] Problems adding Projects to Workspace in Xcode 4

查看:32
本文介绍了在 Xcode 4 中将项目添加到工作区的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个项目是我前段时间在 Xcode 3.2.x 下启动的.几天前我切换到 Xcode 4,并希望将工作区功能用作两个项目.基本上,我的计划是从两个项目中提取一些共同特征,并使它们成为两个项目都依赖的公共库.然而,在我解决棘手的依赖关系之前,我只能将我的两个项目添加到工作区.

I have a couple of projects that I had started under Xcode 3.2.x some time ago. I switched to Xcode 4 a few days ago and want to make use of the Workspace feature as both projects. Basically, my plan is to extract some common features out of the two projects and make them a common library that both projects depend on. However, before I even get to the tricky bit of dependencies I get stuck just adding my two projects to the workspace.

我尝试创建一个新工作区并从上下文菜单中选择将文件添加到";然后我从我的第一个项目中选择 .xcodeproj 文件,它出现在我工作区的左侧树浏览器中.但是,这只是文件,而不是我得到的项目.也就是说,我没有在树浏览器中获得两行条目,其中第一行表示项目名称,第二行表示类似 Apple 文档中的1 个目标,iOS SDK 4.3"之类的内容,我只得到一行说明 .xcodeproj 文件的名称,包括扩展名.左边也没有三角形来扩展节点.就像我只是在工作区中拖动了一些文件,而不是一个项目.第二个项目也是如此.

I tried creating a new workspace and selecting "Adding files to " from the context menu; I then select the .xcodeproj file from my first project and it appears in the left-hand side tree browser in my workspace. However, it's just the file, not the project that I get. That is, rather than getting a two-line entry in the tree browser where the first line states the project name and the second line says something like "1 target, iOS SDK 4.3" like in the Apple documentation, I get a single line simply stating the name of the .xcodeproj file including the extension. There is also no triangle on the left to expand the node. It's like I just dragged some file in the workspace, not a project. The same goes for the second project.

我还在 Xcode 4 中从头开始创建了一个新项目Foo"并将其添加到我的工作区,结果相同.我看了 Apple 文档,现在看了十几遍 16 秒的视频,但无法弄清楚我做错了什么(如果问题确实出在椅子上而不是电脑上).

I have also created a new Project "Foo" from scratch in Xcode 4 and added it to my workspace, with the same result. I looked at Apple documentation and watched the 16 second video about a dozen times now, but cannot work out what I am doing wrong (if the problem is indeed in the chair and not in the computer).

推荐答案

我遇到了完全相同的问题.我认为这源于另一个工作区已经打开,引用了您要添加的项目.我让它工作:

I had this exact same problem. I think it stems from having another workspace already open referencing the project you want to add. I got it working by:

  1. 完全关闭 xcode
  2. 双击工作区以启动 Xcode 并仅打开该工作区
  3. 从 Finder 中拖放项目文件

工作正常.我有很多工作区都引用了一个 openssl 项目,当您在 Xcode 中一次只打开一个工作区时,它似乎可以正常工作.

Worked fine. I have many workspaces all referencing an openssl project, and it seems to work OK when you only have one workspace open at a time in Xcode.

这篇关于在 Xcode 4 中将项目添加到工作区的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆