I can't find the good old "Add existing frameworks" option. How do I do this?
We're talking about Xcode 4 DP2 (in the context of iPhone development, as far as it matters...).
In the project navigator, select your project. Select your target. Select the "Build Phases" tab. Open "Link Binaries With Libraries" expander. Click the + button. Select your framework. (optional) Drag and drop the added framework to the "Frameworks" group.
I just added the existing framework folder manually into the project navigator. Worked for me.
Follow below 5 steps to add framework in your project.
Click on Project Navigator. Select Targets (Black arrow in the below image). Select Build phases ( Blue arrow in the below image). Click on + Button (Green arrow in below image). Select your framework from list.
https://i.stack.imgur.com/nByh4.png
Here is the official Apple Link
Another easy way to do it so that it is referenced in the project folder you want, like "Frameworks", is to:
Select "Show the Project navigator" Right-click on the project folder you wish to add the framework to. Select 'Add Files to "YourProjectName"' Browse to the framework - generally under /Developer/SDKs/MacOSXversion.sdk/System/Library/Frameworks Select the one you want. Select "Add"
It will appear in both the project navigator where you want it, as well as in the "Link Binary With Libraries" area of the "Build Phases" pane of your target.
The frameworks directory is as follow in my computer: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks
not the directory
/Developer/SDKs/MacOSXversion.sdk/System/Library/Frameworks
In Project
Select the project navigator Click on Build Phases Click on link binary with libraries Click on + Button and add your Frameworks
Follow the screen shots
https://i.stack.imgur.com/tkekO.png
https://i.stack.imgur.com/ProxW.png
you are ready to Go!
In the project navigator, select your project. Select your target. Select the "Build Phases" tab. expander. Click the + button. Select your framework. (optional) Drag and drop the added framework to the "Frameworks" group.
Xcode 12
Just drag it into the Frameworks, Libraries, and Embedded Content
of the General
section of the Target
:
https://i.stack.imgur.com/r0wt8.png
Note that Xcode 11 and 10 have a very similar flow too.
Starting Xcode v11 you should use
<Project settings> -> <App Target> -> Frameworks, Libraries, and Embedded Content
//or
<Project settings> -> <Framework Target> -> Frameworks and Libraries
Also do not forget to check Library Search Paths
or Framework Search Paths
. I would recommend you to use drag-and-drop[About]
Success story sharing