Cocoa framework development: sharing between projects

Posted by e.James on Stack Overflow See other posts from Stack Overflow or by e.James
Published on 2010-05-12T02:05:51Z Indexed on 2010/05/12 2:14 UTC
Read the original article Hit count: 249

Filed under:
|
|
|
|

I am currently developing a handful of similar Cocoa desktop apps. In an effort to share code between them, I have identified a set of core classes and functions that can be common across all of these applications. I would like to bundle this common code into a framework which all of my current applications (and any future ones) can link against.

Now, here's the hard part: I'm going to be developing this framework as I go, so I need each of my desktop apps to have a reference to it, but I want to be able to edit the framework source code from within each of the app projects and have the framework automatically rebuilt as required.

For example, let's say I have the Xcode project for DesktopAppNumberOne open, and I decide that one of my framework classes needs to be changed. I would like to:

  1. Open and edit the source file for that framework class without having to open the framework project in Xcode.
  2. Hit "build" on DesktopAppNumberOne, and see the framework rebuilt first (because one of its sources has changed), then see parts of DesktopAppNumberOne rebuilt (because one of the frameworks it links against has changed).

I can see how to do this with only one app and one framework, but I'm having trouble figuring out how to do it with multiple apps that share a single framework.

Has anyone had success with this approach? Am I perhaps going about this the wrong way? Any help would be appreciated.

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about framework