Reputation: 501
I have created a Cocoa framework for an OS X application.
I now want to add my framework to a different Xcode project and used this tutorial, http://jaanus.com/blog/2014/07/09/how-to-correcty-configure-building-private-slash-embeddable-os-x-frameworks/
However I am getting the following error,
dyld: Library not loaded: @executable_path/../Frameworks/TestFrame.framework/Versions/A/TestFrame
Referenced from: /Users/sfm/Library/Developer/Xcode/DerivedData/TestApp-byxusmdybnklhceubusavrswfxtr/Build/Products/Debug/TestApp.app/Contents/MacOS/TestApp
Reason: image not found
I assume the install path has to be changed in the Framework build setting project not the application build setting project. Can any body guide me what am i doing wrong as I am new to Mac OS X development?
Upvotes: 1
Views: 2311
Reputation: 299325
The post you link kind of breezes over the "Copy Files" step. Did you actually follow that?
We add a new “Copy Files” phase to bundle the framework into the application.
You should look in your app bundle (on disk) and see if there is a Contents/Frameworks/TestFrame.framework
directory. I'm betting there isn't.
Xcode has gotten a bit better about configuring frameworks automatically. I recommend consulting the Framework Programming Guide, specifically Embedding a Private Framework in Your Application Bundle which has a bit more modern instructions.
Upvotes: 2