Tuesday, November 12, 2013

Linking frameworks to app bundles in Cocoa (via Xcode)

If you're looking to link a framework to an app bundle, here's the easiest way to achieve it in 3 quick steps (applies for OS X 10.5 and up):


  • For the framework you're linking, setup the installation directory with @rpath 
  • For the application that's going to use the framework
    • Copy the framework to the Frameworks directory under the app bundle
    • Add the following entry into the App's Linking section. Essentially where to look for the framework within the bundle


And that's it - you're done. Lots of articles on the web on this (and of-course Apple's documentation).