iOS应用程序在启动时崩溃,``dyld 1库丢失''

发布于 2025-02-12 08:49:54 字数 1245 浏览 0 评论 0原文

我有2台机器从XCarchive导出IPA。在机器a中它正在工作。我没有问题,可以安装该应用并使用它。但是,当从机器b中导出它时,我会在启动时发生崩溃:

Termination Reason: DYLD 1 Library missing
Library not loaded: /Users/admin/Library/Developer/Xcode/DerivedData/MyApp-dnlmptwccpzuvfamalwjuzqgqqjc/Build/Products/Debug-iphoneos/mylib.dylib
Referenced from: /private/var/containers/Bundle/Application/6AAE33-320-403-BDA-21C117699/MyApp.app/MyApp
Reason: tried: '/Users/admin/Library/Developer/Xcode/DerivedData/MyApp-dnlmptwccpzuvfamalwjuzqgqqjc/Build/Products/Debug-iphoneos/mylib.dylib' (no such file), '/usr/local/lib/mylib.dylib' (no such file), '/usr/lib/mylib.dylib' (no such file)

很明显,链接是错误的。这是同一项目/配置和两台机器中相同的Xcode版本。

它在“嵌入库”和“ RunPath搜索路径”中添加到@exputable_path/frameworks

的确,档案是不同的。工作的存档具有一个文件夹@RPath的动态库。另一方面,崩溃的存档具有文件夹用户

工作:

崩溃:

有什么想法吗?

非常感谢

I have 2 machines where I am exporting an IPA from my xcarchive. In the machine A it's working. I have no problems and I can install the app and use it. But when exporting it from the machine B I have a crash at the launch:

Termination Reason: DYLD 1 Library missing
Library not loaded: /Users/admin/Library/Developer/Xcode/DerivedData/MyApp-dnlmptwccpzuvfamalwjuzqgqqjc/Build/Products/Debug-iphoneos/mylib.dylib
Referenced from: /private/var/containers/Bundle/Application/6AAE33-320-403-BDA-21C117699/MyApp.app/MyApp
Reason: tried: '/Users/admin/Library/Developer/Xcode/DerivedData/MyApp-dnlmptwccpzuvfamalwjuzqgqqjc/Build/Products/Debug-iphoneos/mylib.dylib' (no such file), '/usr/local/lib/mylib.dylib' (no such file), '/usr/lib/mylib.dylib' (no such file)

It's clear that the linking is wrong. It's the same project/configuration and the same Xcode version in both machines.

It is added in the "Embed Libraries" and "Runpath Search Paths" is set to @executable_path/Frameworks

Indeed, the archives are different. The archive that work has a folder @rpath for the dynamic library. On the other hand, the archive that crashes has a folder Users

Working:
enter image description here

Crashing:
enter image description here

Any ideas?

Thank you very much

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

左岸枫 2025-02-19 08:49:54

问题是机器上有问题的Cmake版本。更新到3.23解决了我的问题。确实,这似乎是Cmake 3.15

https://github.com/libevent.com/libevent/libevent/问题/920

The problem was the cmake version on the machine with the problem. Updating to 3.23 solved my problem. Indeed it seems to be a bug on cmake 3.15

https://github.com/libevent/libevent/issues/920

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文