dyld:库未加载:@rpath 与 iOS8

2023-05-17移动开发问题
3

本文介绍了dyld:库未加载:@rpath 与 iOS8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我正在使用 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

硬件音量按钮更改应用程序音量
Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)...
2024-08-12 移动开发问题
10

恢复游戏 cocos2d
Resume game cocos2d(恢复游戏 cocos2d)...
2024-08-12 移动开发问题
6

突出显示朗读文本(在 iPhone 的故事书类型应用程序中)
Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))...
2024-08-12 移动开发问题
9

Cocos2D + 仅禁用 Retina iPad 图形
Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)...
2024-08-12 移动开发问题
10

正确的 cocos2d 场景重启?
Proper cocos2d scene restart?(正确的 cocos2d 场景重启?)...
2024-08-12 移动开发问题
7

[ios.cocos2d+box2d]如何禁用自动旋转?
[ios.cocos2d+box2d]how to disable auto-rotation?([ios.cocos2d+box2d]如何禁用自动旋转?)...
2024-08-12 移动开发问题
7