How to "add existing frameworks" in Xcode 4?
XcodeFrameworksXcode4Xcode Problem Overview
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...).
Xcode Solutions
Solution 1 - Xcode
- 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.
Solution 2 - Xcode
I just added the existing framework folder manually into the project navigator. Worked for me.
Solution 3 - Xcode
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.
Here is the official Apple Link
Solution 4 - Xcode
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.
Solution 5 - Xcode
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
Solution 6 - Xcode
In Project
- Select the project navigator
- Click on Build Phases
- Click on link binary with libraries
- Click on + Button and add your Frameworks
Solution 7 - Xcode
Follow the screen shots
you are ready to Go!
Solution 8 - Xcode
-
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.
Solution 9 - Xcode
Xcode 12
Just drag it into the Frameworks, Libraries, and Embedded Content
of the General
section of the Target
:
Note that Xcode 11 and 10 have a very similar flow too.
Solution 10 - Xcode
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]