18

How i can add a framework to XCode 4.3.2 project ?

Because a SDK directories inside a XCode.app and i can't add a framework by "Add files to ..."

Updated:

For this action you can do a this steps:

  1. Click on Project at left table

  2. Click on "Build Phases" on right table

  3. Click on "Link Binary With Libraries"

  4. Click "+"

  5. Find needing framework and click "Add"

And your needing framework in your project.

jww
  • 97,681
  • 90
  • 411
  • 885
CReaTuS
  • 2,593
  • 1
  • 19
  • 31

3 Answers3

27

Following are steps-

1) Click project in Navigator area

2) Select 'TARGETS' tab

3) Click on 'Build Phases'

4) Select 'Link Binary With Libraries'

Then you can see '+' button at the bottom in the area. You can now add the framework that you want.

rishi
  • 11,779
  • 4
  • 40
  • 59
  • Thanks, i founded this feature =) – CReaTuS May 11 '12 at 06:24
  • The plus to be used is NOT the + with Add Target under it, but the + that is at the bottom of the Link Binary With Libraries grouping. – Refactor Apr 26 '13 at 17:02
  • Actually in my frameworks list its not getting listed.I think it has been deleted by mistake.What can I do in this case? – iOSiOS Sep 30 '13 at 07:35
4

Although rishi's answer works great, this doesn't add the framework to the Project Navigator's "Frameworks" folder.

Another method is to right click any of your existing frameworks in the Project Navigator's "Frameworks" folder, select "Show in Finder," then just drag and drop the framework you want to add.

When it asks how you want to add the framework, make sure you add it to your target, which will then add it inside the "Link With Libraries" section of Build Phases.

UPDATE:

This is merely a convenience method for adding a framework for those that are looking for the framework to show up in their "Frameworks" folder.

Read comments about not selecting the "Copy to group's destination folder" checkbox, because it will unnecessarily add it to the root of your project folder.

whyoz
  • 5,168
  • 47
  • 53
  • 1
    I don't have a Frameworks folder and Why copy a framework? – CReaTuS Aug 10 '12 at 05:59
  • Great point...since the Frameworks folder is a default folder when you create a project from one of the XCode templates, I thought most developers just kept that in there. Even if you select "Empty Application" when creating your project, there's a Frameworks folder. Also, I never said anything about copying...but I didn't say not to copy it, or not to "Copy it to group's destination folder." Don't copy it! Haha...thanks CReaTus – whyoz Aug 10 '12 at 21:31
  • 1
    I much prefer doing it this way than the selected answer. Keeps the workspace organized. – Matthew Quiros Jul 11 '13 at 07:01
0

You can add frameworks to your application in following ways.

Click on Project panel and click on xcode project and select on Targets.

After selecting Targets then you click on Build Phases.

In Build Phases you see list of activity like. a) Target Dependencies b) Compiler Sources c) Link Binary with Libraries d) Copy Bundle Resources

Please Click on Link Binary with Libraries once you click panel expand and you can seee the list of framework. Now you have to click the +(button) then you can choose and add existing frameworks.

Hope it will help you.

Alok kumar
  • 32
  • 1
  • 9