dyld:未加载库:带有iOS8的@rpath [英] dyld: Library not loaded: @rpath with iOS8
问题描述
我正在使用Xcode6和iOS8创建一个iOS框架。当我将其与iOS应用程序链接并尝试在设备上运行时,我收到此错误
I'm creating an iOS framework with Xcode6 and iOS8. When I link this with an iOS app and try running it on the device I get this error
dyld: Library not loaded: @rpath/FrameworkName.framework/FrameworkName
Referenced from: /private/var/mobile/Containers/Bundle/Application/0F2C2461-A68B-4ABA-A604-B88E6E9D1BB1/AppName.app/AppName
Reason: image not found
框架的Runpath搜索路径构建设置默认设置为
The 'Runpath Search Paths' build setting for the framework is set by default to
'@executable_path/Frameworks', '@loader_path/Frameworks'
我找不到与此相关的任何文件。这是Xcode6引入的新功能,我希望它只需将框架包含在任何需要它的应用程序中即可。
I could not find any documentation related to this. This was something new introduced with Xcode6 and I would expect it to just work by simply including the framework into any app that needs it.
推荐答案
要使这项工作
-
在框架项目设置中,从
'/ Library / Frameworks更改安装目录'to'@executable_path /../ Frameworks'
In the framework project settings change the install directory from '/Library/Frameworks' to '@executable_path/../Frameworks'
在包含此框架的项目中,添加一个复制文件阶段并将此框架复制到'Frameworks '文件夹。执行此操作后,请确保此框架列在嵌入式二进制文件部分下。
In the project that includes this framework, add a copy files phase and copy this framework to the 'Frameworks' folder. Once you do this ensure that this framework is listed under the 'Embedded Binaries' section.
这篇关于dyld:未加载库:带有iOS8的@rpath的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!