Xcode 4 Installing/Linking Custom Framework
This a working recipe for installing a custom framework and linking it from another project using Xcode 4.
It doesn’t look beautiful, but whatever.
Let’s say your framework is called CustomFramework.
Go the CustomFramework Xcode project and click on CustomFramework on the top of the left pane. Click on the CustomFramework target and then in the Build Phases Tab. Click in Add Build Phase (bottom right) and then in Add Copy Files in the submenu that appears. Se the destination to Absolute Path and type “/Library/Frameworks/” (without quotes) in the Subpath field. That tells Xcode to install your framework in the folder /Library/Frameworks/. OK, build the project. If Xcode tells you don’t have permission to install the framework, go the folder /Library/Frameworks and change your permissions (via Info panel or Terminal/chmod). OK, done with the CustomFramework project.
Now suppose you want to use CustomFramework in your App project.
Open the App Xcode project. Open Finder and go to /Library/Frameworks. CustomFramework.framework should be there. Drag CustomFramework.framework to the left pane of the App project, under the Frameworks section. When asked, tell Xcode you’d like to copy the files to the project folder if needed (I tried telling no to this question but it didn’t work).
That should be it. If you know of a better way, please write on the comments area. If you’re friends with Apple, please let them know there should be a easier way of doing this.