views:

409

answers:

3

Hello, 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?

+8  A: 

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.

Grant Limberg
A: 

I have a similar issue with the AppScript framework

dyld: Library not loaded: /Users/UserName/Library/Frameworks/Appscript.framework``/Versions/A/Appscript
  Referenced from: /Users/UserName/.../TestApp/build/Debug/TestApp.app/Contents/MacOS/TestApp
  Reason: image not found

However, I do have a Copy Files build phase, and another framework which I have added to my App works fine.

Any clue what I'm doing wrong?

demonslayer319
Please ask a separate question. This answer does not answer this question.
Peter Hosey
+1  A: 

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

Cheers.