How do I compile a framework in Xcode?

Discussion in 'Mac Programming' started by natatos, Sep 22, 2011.

  1. natatos macrumors regular

    Joined:
    Dec 23, 2008
    Location:
    Iowa
    #1
    Hi, I'm trying to do something with the GData framework. I've downloaded the latest version and it just came as a xcode project and in the targets has the .framework. I've tried compiling it but it just says build successful then I can't find where it built it too. Any help would be appreciated.
     
  2. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #2
    Which version of XCode are you using? This details are different between XCode 3 and XCode 4.
     
  3. natatos thread starter macrumors regular

    Joined:
    Dec 23, 2008
    Location:
    Iowa
  4. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #4
    After building, the framework will be in the derived data directory for the project.
    1. Window | Organiser
    2. Projects tab
    3. Select your project on the left
    4. Click the white on a circle next to the Derived Data path
    5. In the Finder window that appears, go to Products/Debug or Products/Release.
    6. Inside either of those is the debug-build and release-build of the .framework.

    Alternatively (and perhaps superiorly) you can archive and share the project.
    1. Product | Archive
    2. In the Organizer window, under the Archives tab, with your project select on the left (this should have all happened automatically)
    3. Share
    4. Contents: Build Products, Next
    5. Choose a place to save the product. The framework will be put under Library/Frameworks under that place.

    But you may not have to do any of this if you're just going to use the framework in another XCode project. Instead you can create a workspace with both this framework project and the project that will use the framework.
     
  5. natatos thread starter macrumors regular

    Joined:
    Dec 23, 2008
    Location:
    Iowa
    #5
    Ok I did the first option and got a folder called GData.framework. So I copied that to the frameworks folder then in xcode added other on the add frameworks part then went to the gdata.framework folder. Is this right?
     
  6. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #6
    Sounds right. Did it actually work for you?
     
  7. natatos thread starter macrumors regular

    Joined:
    Dec 23, 2008
    Location:
    Iowa

Share This Page