Xcode 4: Adding a Framework to Your Project

March 25th, 2011

Filed under: Mac Development, Xcode | 12 comments

To add a framework to your project, select the project file from the project navigator on the left side of the project window. Select the target from the project settings editor. Click the Summary button at the top of the editor.

Xcode 4 Linked Frameworks

You will see a list of linked frameworks and libraries in the project settings editor. Click the + button to add a framework or library to your project.


12 thoughts on “Xcode 4: Adding a Framework to Your Project

  1. WMaxfield says:

    This does not work in XCode 4 when doing an IOS project. You have to click on “Build Phases” and then select “Link Binary with Libraries” then click on the “+” sign to add a framework. If the Link Binary with Libraries does not exist, click on the “Add Build Phase” button.

    All in all, XCode 4.0 made it much more difficult to do the work needed to get an app into the app store. I have yet to figure out how to actually debug an application. I can run it, but the set breakpoint did not work.

    Apple is trying to help Microsoft right now. If they keep trying, they will succeed.

    • Mark Szymczyk says:

      You’re right. What I posted works only for Mac application projects, not iPhone projects.

      The Breakpoints button in the project window toolbar toggles running and debugging.

  2. natalie says:

    Ive added a PDFkit Framework to my project, now how do I find the Interface Builder Preference to add it to Palettes? I found a tutorial but not for Xcode4 so its not working.

    • Mark Szymczyk says:

      The PDFKit user interface elements are part of Xcode 4’s object library. Choose View > Utilities > Object Library to open the object library in the lower right corner of the project window. Choose PDFKit from the Object Library pop-up menu.

  3. Alex Haddad says:

    Sometimes I see the Object kits under Objects library and sometimes I do not. Any clue why that is?

  4. Imran says:

    Hi all,

    What if I have multiple targets in my project and I want to add a framework to all these targets at once?
    I have tried adding a framework one by one for all targets but then, that framework appears more than once in project navigator 🙁

    Any clues?

    • Mark Szymczyk says:


      I do not have a solution for you. I had the same problem with one of my projects and I never found a solution. I learned to live with the multiple copies of the framework folder in the project navigator.

  5. grumbler says:

    Hi All,

    Is there a way i can USE/IMPORT to PDFKit on my iPad Application?
    It is only available when a creating a project on MAC OS X
    Please help me, i’ve been searching for a week already.

  6. I have a mac and am taking a computer science course for school. I downloaded xcode to write the programs. I am learning C++ in my class. I looked up how to write C++ programs online but it appears I am missing the C++ Tool template under the Command Utility Line to start making the program. The only things that appear under Mac OS X sidebar after clicking New Project are as follows: Application, Framework & Library, Application Plug-in, System Plug-in, and Other. It is Xcode version 3.2.6. If you could help at all it would be greatly appreciated. I am new to programming so my knowledge is limited, but hopefully it will expand.

    • Mark Szymczyk says:

      Select Application under Mac OS X to find the command line tool project. If you are new to programming, I have an article on my site that walks you through the creation of a C++ command-line tool project. Click the Articles link on the sidebar to find it.

Leave a Reply

Your email address will not be published. Required fields are marked *