views:

237

answers:

1

IBCocoaSimulator crashes when IB cannot find the framework, I assume that happens to you too. I can run IBCocoaSimulator without crash, when I manually copy my framework+ibplugin from the build dir into /Users/username/Library/Frameworks. I'm doing this with Finder, this is not optimal, but works.

I have searched for a smarter way and each solution (BWToolkit, BGHUDAppKit, KTUIKit) I have been looking at, does things in much different ways. One solution runs a sudo script that copies it to the system wide /Library/Frameworks. Another sets @loader_path and yet another uses @executable_path. I haven't had luck with any of them and because of the great differences it's hard to see the pattern.

I'm confused.

How do you config you IBPlugin, so that you can embed it in your app?


UPDATE 1:

Yay, solved it, after reading a blog post by dribin about how to use @rpath, I figured out how to get it working with my IBPlugins. So copy using Finder is no longer needed.

What I did was:

  1. For MySmallFramework set Installation Directory to @rpath
  2. For MySmallPlugin set Runpath Search Paths to @loader_path/../Frameworks
  3. For MySmallApp set Runpath Search Paths to @loader_path/../Frameworks

Nice.

+1  A: 

Might be obvious to most of you, but neoneye's solution as posted in his "Update 1" requires your plugin target to have a "copy framework files" build phase with the given framework assigned to.

(don't yet have enough points for direct commenting :( hence the answer post)

Regexident