3

I am using Restkit for a Mac app. I can run the App from Xcode, but when I Archive the app and start the .app bundle I get the following error:

Dyld Error Message:
  Library not loaded: /Library/Frameworks/RestKit.framework/Versions/A/RestKit
  Referenced from: /Users/USER/Desktop/*/MyApp.app/Contents/MacOS/MyApp
  Reason: image not found

The framework Restkit.framework is a product of the Restkit project dependency within my project. I am also using another framework Sparkle.framework which I also copy to the .app bundle and which is referenced correctly.

What do I have to change in my project, that MyApp does not reference the framework via /Library/Frameworks/... but rather use the framework from the app bundle like the Sparkle.framework.

I am using Restkit at commit c19a500

Besi
  • 22,579
  • 24
  • 131
  • 223
  • Curiously, when I build the RestKit project, the products remain in red color, which suggests, that the framework was not built. – Besi Feb 01 '12 at 17:07
  • I have created [an issue](https://github.com/RestKit/RestKit/issues/543) on github and will post any results here as they should become available – Besi Feb 01 '12 at 17:14

1 Answers1

1

After a few hours of investigation I finally figured out the problem. The problem in my case was the frameworks Installation Directory path:

Bad (Results in Library/Frameworks):

INSTALL_PATH = $(LOCAL_LIBRARY_DIR)/Frameworks

Good:

INSTALL_PATH = "@executable_path/../Frameworks";

BTW: I found this in the Growl Xcode project

Besi
  • 22,579
  • 24
  • 131
  • 223
  • 1
    I added a [Pull request](https://github.com/RestKit/RestKit/pull/544) for RestKit, which should fix the issue. – Besi Feb 01 '12 at 18:30
  • what about a RestKit version imported using Cocoa Pods? Getting the same message when I run the UI Tests. Please view: http://stackoverflow.com/questions/33997979/ios-app-failing-when-running-ui-test-in-xcode-7-1-1 – Claus Nov 30 '15 at 12:58