XCode 4 how to add an external project

2019-04-28 03:21发布

问题:

I am stuck with an issue of including an project in xcode 4 i have all the document but it works with xcode 3 and not xcode 4.

Please help me out in how to add ZXingWidget.xcodeproj to my project in xcode 4.

Regards, Hemant

回答1:

In Xcode 4, you're mostly meant to create a new Workspace to which you can add multiple projects. From the main menu: File > New... > New Workspace...

Once you create your new workspace, drag the Xcode project files into the project navigator of the newly-created workspace. Drop the first one anywhere in the project navigator pane but be careful to note the insertion pointer when you drop the second one. Advice: Drop it beneath the entire first project but with your pointer as close to the left edge of the project navigator panel as you can get. This makes sure you're not inserting a project into another project.

In this way, you get all the benefits of a workspace (automatic dependencies, etc.) without changing the structure of the projects themselves. Then you simply open the workspace rather than the individual projects within it.



回答2:

Despite that this question had been asked months ago, here is a great resource directly answering it. It worked flawlessly for me (even though I had ARC turned on for the main project I was importing it into).



标签: ios4 xcode4