Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Kelmon

macrumors 6502a
Original poster
Mar 28, 2005
725
0
United Kingdom
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

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
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

macrumors 6502a
Original poster
Mar 28, 2005
725
0
United Kingdom
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

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
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...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.