Search code examples
iphoneobjective-cxcode4workspace

Xcode 4 workspace, cross-referencing files


I am currently switching from developing two separate Xcode Projects into using Xcode workspace. And thus have a question.

After I import two of my projects into workspace, how do I tell one project to search for files in another project?

What I would like to accomplish is to get rid of duplicate classes that are the same for both project and keep them only in one project.

Example. In project A I have a class Book I would like to use this class in project B but not to be forced to actually have it.


Solution

  • Two propositions, I am assuming your project A and B are two iOS applications :

    • Share files accross projects

      (just reference files, do not copy, should use a common/ folder to stay clean and safe)

    • Create a static library referenced by both projects (more complex...)