XCode Project Dependencies - Incorporating 1 Project in Another

Discussion in 'Mac Programming' started by Kelmon, Nov 18, 2007.

  1. macrumors 6502a

    Kelmon

    #1
    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?
     
  2. Moderator

    robbieduncan

    Staff Member

    #2
    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...
     
  3. macrumors 6502a

    Kelmon

    #3
    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.
     
  4. Moderator

    robbieduncan

    Staff Member

    #4
    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...
     
  5. macrumors 6502a

    Kelmon

    #5
    Understood. Thanks.
     

Share This Page