Search code examples
iosxcodesharedworkspace

How to import/link shared xCode project (and be able to edit shared project from any client)?


I don't want to compile shared project to any kind of library. I just want to use existing classes like they would integral part of client project.

I want to edit/develop/improve the shared project from any client project that use it.

I've ran trough google, but couldn't find the simpliest/more convenient approach.


More simple:

I want drag and drop shared code project, and be able to edit it anywhere. How?


Solution

  • There are two options: Use a static library, or include the source files directly in your project.

    If you don't want to use a static library (which IMHO is the preferred method for iOS and integrates well with Xcode), you could just add references to the shared classes either as file references or as a folder reference.

    Either way, the build toolchain will link everything together into one Mach-O binary, which is the only way to deliver code for the iOS.