I am trying to create a couple of applications in the Xcode workspace: one application will be an iOS application and the other a Mac OS X. I would like to have a specific set of classes that are included in both versions of the application. I'm struggling to figure out which project structure best supports some common code, some of which relate to the iOS application, and some relate to the Mac application. Is there any best practice for this kind of thing in Xcode in general or Xcode 4?
Should I create a library project for common code and create 2 different objects to build the iOS and Mac OS X libraries? Embedded project templates seem to want me to choose the Mac OS X library or the iOS library, and I'm not sure if it is easy to make a project based on one of these templates for both purposes.
Should I instead create different projects for the iOS library, Mac OS X library, iOS application and Max OS X application? In this case, how can I easily get the library code shared between the iOS library and Mac OS X library projects?
Tim dean
source share