How add Framework to project on Xcode 4.3.2 [duplicate]
Asked Answered
C

3

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.

Ceto answered 11/5, 2012 at 6:19 Comment(0)
J
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.

Jubilation answered 11/5, 2012 at 6:23 Comment(3)
Thanks, i founded this feature =)Ceto
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.Odell
Actually in my frameworks list its not getting listed.I think it has been deleted by mistake.What can I do in this case?Gash
C
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.

Camelot answered 10/8, 2012 at 0:40 Comment(3)
I don't have a Frameworks folder and Why copy a framework?Ceto
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 CReaTusCamelot
I much prefer doing it this way than the selected answer. Keeps the workspace organized.Lovegrass
M
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.

Maines answered 3/4, 2014 at 4:46 Comment(1)
Thanks for answer, but rishi answered already and all works at fine =)Ceto

© 2022 - 2024 — McMap. All rights reserved.