【问题标题】:App references framework outside of app bundle应用程序包之外的应用程序引用框架
【发布时间】:2012-02-24 06:48:20
【问题描述】:

我正在为 Mac 应用程序使用 Restkit。我可以从 Xcode 运行应用程序,但是当我存档应用程序并启动 .app 捆绑包时,我收到以下错误:

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

框架Restkit.framework是我项目中Restkit项目依赖的产物。我还在使用另一个框架 Sparkle.framework,我也将它复制到 .app 包中,并且引用正确。

我必须在我的项目中进行哪些更改,即 MyApp 不通过 /Library/Frameworks/... 引用框架,而是使用应用程序包中的框架,例如 Sparkle.framework

我在提交时使用 Restkit c19a500

【问题讨论】:

  • 奇怪的是,当我构建 RestKit 项目时,产品仍然是红色,这表明框架没有构建。
  • 我在 github 上创建了an issue,并将在此处发布任何结果,因为它们应该可用

标签: objective-c xcode macos cocoa frameworks


【解决方案1】:

经过几个小时的调查,我终于找到了问题所在。我的问题是框架Installation Directory 路径:

不好(Library/Frameworks 中的结果):

INSTALL_PATH = $(LOCAL_LIBRARY_DIR)/Frameworks

好:

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

顺便说一句:我在Growl Xcode project 中找到了这个

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2014-05-12
  • 2011-04-08
  • 1970-01-01
  • 1970-01-01
  • 2010-11-20
  • 2023-03-31
  • 1970-01-01
  • 2015-04-27
相关资源
最近更新 更多