dyld:库未加载:@rpath 与 iOS8

dyld: Library not loaded: @rpath with iOS8(dyld:库未加载:@rpath 与 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.

推荐答案

完成这项工作

  1. 在框架项目设置中将安装目录从'/Library/Frameworks' 到 '@executable_path/../Frameworks'

  1. 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

基础教程推荐