dyld:库未加载。原因:没有找到合适的图像 [英] dyld: Library not loaded. Reason : no suitable image found

查看:249
本文介绍了dyld:库未加载。原因:没有找到合适的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里看了一堆答案,没有一个解决我的问题。

I've looked at a bunch of answers here and none have fixed my issue.

我有一个包含自定义框架和iOS应用程序项目的Xcode工作区。该项目一直工作到今天早上,现在它建立,但立即崩溃:

I have an Xcode workspace with a custom framework and an iOS app project. The project has been working fine until this morning, now it builds but immediately crashes:

dyld: Library not loaded: @rpath/ONCKit.framework/ONCKit
  Referenced from: /private/var/mobile/Containers/Bundle/Application/4DF67A3F-6255-4276-8812-8C742A363995/atero_t.app/atero_t
  Reason: no suitable image found.  Did find:
    /private/var/mobile/Containers/Bundle/Application/4DF67A3F-6255-4276-8812-8C742A363995/atero_t.app/Frameworks/ONCKit.framework/ONCKit: mmap() error 1 at address=0x100118000, size=0x000B8000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/4DF67A3F-6255-4276-8812-8C742A363995/atero_t.app/Frameworks/ONCKit.framework/ONCKit
    /private/var/mobile/Containers/Bundle/Application/4DF67A3F-6255-4276-8812-8C742A363995/atero_t.app/Frameworks/ONCKit.framework/ONCKit: mmap() error 1 at address=0x100280000, size=0x000B8000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/4DF67A3F-6255-4276-8812-8C742A363995/atero_t.app/Frameworks/ONCKit.framework/ONCKit

我一直在试验构建设置,我完全失去了。

I've been experimenting with build settings all day and I'm just totally lost.

推荐答案

我今天遇到这个问题,并以同样的方式解决。撤销和重新生成代码签名可解决此问题。

I came across this issue today and resolved it the same way. Revoke and regenerate code signing solves this issue. But to shed some light on the "why" part of it.

苹果公司继续改变了证书的内容。更准确地说,它在主题下添加了新的OU(组织单位)字段。通过撤销和重新生成代码签名,它添加了缺少的字段,问题消失了。

Apple went ahead and changed the certificate contents. To be more precise, it added a new "OU" (organizational unit) field under Subject. By revoking and regenerating the code signing, it added the missing field and the problems went away.

这篇关于dyld:库未加载。原因:没有找到合适的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆