PDA

View Full Version : XCode Project Dependencies - Incorporating 1 Project in Another




Kelmon
Nov 18, 2007, 04:16 AM
OK, here's the deal:

I want to write a general purpose class that can be used by other applications that I write as it will incorporate a special number generator algorithm that is used by my business. I don't want the XCode project that this class is contained in to hold any sort of UI or controller; that's what the other XCode projects will provide. I have a book that shows how to incorporate a Foundation Tool XCode Project in another XCode Project that provides a UI but sending and receiving input via Standard Input/Output doesn't look very efficient, plus it's not that easy to code.

Can you recommend how to create an XCode project that only includes classes that can be used in other XCode projects? Am I looking at a Framework here?



robbieduncan
Nov 18, 2007, 04:24 AM
The standard solution would be to use a Framework, but if it's a single class you could just include the class in each other project...

Kelmon
Nov 18, 2007, 06:59 AM
but if it's a single class you could just include the class in each other project...

Silly question but do you mean creating the class in each project (i.e. copy/paste code), or do you mean something else? Clearly I'm looking for a solution that will enable projects to be rebuilt using updated versions of the general class if I make updates to it.

I should point out, in case it wasn't clear, that I'm definitely an XCode novice so my apologies if I have misinterpreted what you said. Some more explanation might be required if the proposed solution is more advanced that what I have written.

robbieduncan
Nov 18, 2007, 07:07 AM
I meant creating the shared class outside of any of the project folders and add that single file to all projects. Thus if you change the file it changes in all projects...

Kelmon
Nov 18, 2007, 10:57 AM
Understood. Thanks.