tags:

views:

49

answers:

2

I am writing a Cocoa application that makes use of the ParseKit framework (http://www.parsekit.com/). I've included the Framework in the proper folder, added a Copy Files build phase, and added it to the build phase. I can build and launch the application on my Mac.

However, when I try to run it on another Mac, it crashes. The Console shows the following error message:

dyld: Library not loaded: /Users/Jordan/Files/ParseKit/build/Debug/ParseKit.framework/Versions/A/ParseKit

It looks like when the app launches, it is looking for the framework on my local drive. However, the framework is in the Copy Files build phase, so it has been copied into that application's Contents/Frameworks folder. If if the application were looking in this folder, it would be able to load the framework just fine, but for some reason it's looking for it on my local drive on the original Mac (which obviously doesn't exist on the other Mac).

What am I doing wrong?

+1  A: 

Use install_name_tool to change the framework’s install path to “@loader_path/../Frameworks/”.

Ahruman
What specifically should I change? The full Terminal command would be helpful, thank you.
Jordan Kay
+1  A: 

Since it sounds like you're building it from source, set the install path in its Xcode project. You should submit a patch to the original developers once you get it working (partly to make it easier for you to keep up with future updates to the framework).

Peter Hosey