How do I properly embed third-party frameworks in my Cocoa application?
- by Jordan Kay
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?