My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
FrameworkDeployment  
How to deploy the framework in an application.
Phase-Implementation, Featured
Updated Feb 4, 2010 by adam.r.m...@gmail.com

Using the framework in your app

If you're familiar with adding frameworks to a project in Xcode, skip to the last step below. If not, this is mostly pretty standard stuff that's in the documentation.

You'll also need to read PopulatingTheView in order to actually display icons.

Adding the framework in Xcode

  1. Pull the FileView source from svn and put it somewhere convenient
  2. Open your program's Xcode project
  3. Add a cross-project reference to FileView.xcodeproj
  4. Add a "Copy Files" build phase to your application's target, and set it to "Frameworks"
  5. Expand the FileView cross-project reference in your Xcode project, and drag the FileView.framework to the "Copy Files" build phase just added
  6. Get Info on your target and add the "Framework+Plugins" target from FileView as a direct dependency
  7. Add a shell script build phase to your target (before codesign scripts), and add the following /bin/sh script:
  8.   /usr/bin/install_name_tool -change \
      '@loader_path/../../../../../../../FileView.framework/Versions/A/FileView' \
      '@executable_path/../Frameworks/FileView.framework/Versions/A/FileView'   \
      "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}"

That install_name_tool nastiness is required to make the framework 10.4 compatible, yet still work with the IB plugin. Using @rpath would be better, but it's only supported on 10.5.

Using the IB plugin

Xcode seems to require that you add a reference to the compiled framework (typically Built Product relative path) in the "Linked Frameworks" group before it automagically finds the .ibplugin bundle inside the framework. Once you've compiled it and done that, open up one of your nibs in IB and you should see a "FileView" library item with two objects (FileView and FVColumnView).

Sample Project

Take a look at the FVIBPluginTest.xcodeproj sample project, which demonstrates all of the points made here.


Sign in to add a comment
Powered by Google Project Hosting