dyld: Library not loaded: @rpath with iOS8(dyld:库未加载:@rpath 与 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
框架的运行路径搜索路径"构建设置默认设置为
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' 到 '@executable_path/../Frameworks'
In the framework project settings change the install directory from '/Library/Frameworks' to '@executable_path/../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:库未加载:@rpath 与 iOS8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:dyld:库未加载:@rpath 与 iOS8
基础教程推荐
- Firebase 云消息传递令牌未生成 2022-01-01
- 在 iOS 7 下 CCMenu 错位 2022-01-01
- 更改 UITableView 部分标题的颜色 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- EditText 中的 setHintTextColor() 2022-01-01
- 在视图控制器的宽度上水平均匀分布 UIButton 的最简单方法? 2022-01-01
- 从 UIWebView 访问元数据 2022-01-01
- Android - 如何在runOnUiThread 中将数据传递给Runnable? 2022-01-01
- UINavigationBar 隐藏按钮文本 2022-01-01
- UINavigationItem 的持久 rightBarButtonItem 属性 2022-01-01