Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't run my app; “image not found” referring to bundled framework

I'm trying to include the Sparkle framework in my application. I don't really understand the specific steps necessary, and am now getting this error message:

Dyld Error Message:
Library not loaded: @loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle
Referenced from: <..>/build/Debug/CoRay.app/Contents/MacOS/CoRay
Reason: image not found

So my question is two part: 1. How do I fix my problem? 2. What is the correct path for including a framework into a Cocoa/Obj-C application?

like image 624
Allyn Avatar asked May 18 '09 18:05

Allyn


2 Answers

After adding Sparkle.framework in "Copy Files" phase, you have to remove it from "Link Binary With Libraries".

Cheers.

like image 51
Eddietec Avatar answered Nov 11 '22 16:11

Eddietec


The error is saying that it cannot find a copy of the sparkle framework inside of your app bundle.

You need to add a new Copy Files build phase to your target. Set it to "Frameworks" to copy frameworks and drag a copy of Sparkle.framework from your Xcode project into the new Copy Files build phase that you have just created.

like image 41
Grant Limberg Avatar answered Nov 11 '22 16:11

Grant Limberg