更新使用ConnectionKit框架内的一个NSBundle
我既然花时间学习如何使用install_name_tool
& otool
正确做到这一点,这里记录的过程:Using Frameworks Within NSBundles
我想在我正在创建的NSBundle中使用Connection Kit框架。
要允许我的包成功加载框架,我已将dynamic library install name
更改为使用@loader_path
而不是@executable_path
。
建设和包括我的一个NSBundle的框架,然后构建,运行加载我的包程序后,我的包无法加载,并产生下列输出:
Error loading MyBundle.rwplugin/Contents/MacOS/MyBundle: dlopen(/Users/facelap/Library/Developer/Xcode/DerivedData/MyBundle-hiyhdkndcnuhspfqwcuyneqobeou/Build/Products/Debug/MyBundle.rwplugin/Contents/MacOS/MyBundle, 265): Library not loaded: @executable_path/../Frameworks/DAVKit.framework/Versions/A/DAVKit
Referenced from: /Users/facelap/Library/Developer/Xcode/DerivedData/MyBundle-hiyhdkndcnuhspfqwcuyneqobeou/Build/Products/Debug/MyBundle.rwplugin/Contents/MacOS/../Frameworks/Connection.framework/Versions/A/Connection
Reason: image not found
它似乎Connection Kit本身使用框架。
我也有这个框架的来源。我试着将其dynamic library install name
设置为@loader_path
,但是这导致了类似的输出(并且绑定失败)。
对于在NSBundle中使用的框架内的框架,dynamic library install name
会有什么合理的输入?
谢谢,我可能会尝试。你能澄清一下你的意思吗?它的ConnectionKit和DAVKit的设置安装路径...?我不明白你在那里想说什么。 – 2012-02-23 23:46:16
建设DAVKit wihtin ConnectionKit工作,感谢您的提示:) – 2012-02-25 11:12:40