[英]dyld: Library not loaded: iOS app crash Xcode 11.3
I have added ObjectMapper library using CocoaPods.我使用 CocoaPods 添加了 ObjectMapper 库。 Here is my Pod file:
这是我的 Pod 文件:
target 'Example' do
use_frameworks!
pod 'ObjectMapper'
end
when I run the app it crashes resulting the following error当我运行应用程序时它崩溃导致以下错误
dyld: Library not loaded: @rpath/ObjectMapper.framework/ObjectMapper
Referenced from: /private/var/containers/Bundle/Application/7DC2B7C8-C3B8-4250-B4D3-6E373C20DB8E/Example.app/Example
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/7DC2B7C8-C3B8-4250-B4D3-6E373C20DB8E/Example.app/Frameworks/ObjectMapper.framework/ObjectMapper: code signature invalid for '/private/var/containers/Bundle/Application/7DC2B7C8-C3B8-4250-B4D3-6E373C20DB8E/Example.app/Frameworks/ObjectMapper.framework/ObjectMapper'
/private/var/containers/Bundle/Application/7DC2B7C8-C3B8-4250-B4D3-6E373C20DB8E/Example.app/Frameworks/ObjectMapper.framework/ObjectMapper: stat() failed with errno=25
/private/var/containers/Bundle/Application/7DC2B7C8-C3B8-4250-B4D3-6E373C20DB8E/Example.app/Frameworks/ObjectMapper.framework/ObjectMapper: code signature invalid for '/private/var/containers/Bundle/Application/7DC2B7C8-C3B8-4250-B4D3-6E373C20DB8E/Example.app/Frameworks/ObjectMapper.framework/ObjectMapper'
/private/var/containers/Bundle/Application/7DC2B7C8-C3B8-4250-B4D3-6E373C20DB8E/Example.app/Frameworks/ObjectMapper.framework/ObjectMapper: stat() failed with errno=1
/private/var/containers/Bundle/Application/7DC2B7C8-C3B8-4250-B4D3-6E373C20DB8E/Example.app/Frameworks/ObjectMapper.framework/ObjectMapper: code signature invalid for '/private/var/containers/Bundle/Application/7DC2B7C8-C3B8-4250-B4D3-6E373C20DB8E/Example.app/Frameworks/ObjectMapper.framework/ObjectMapper'
/private/var/containers/Bundle/Application/7DC2B7C8-C3B8-4250-B4D3-6E373C20DB8E/Example.app/Frameworks/ObjectMapper.framework/ObjectMapper: stat() failed with errno=1
I've tried all the solutions proposed in similar questions asked here earlier but nothing seems to be working.我已经尝试了之前在这里提出的类似问题中提出的所有解决方案,但似乎没有任何效果。
then I removed "use_frameworks!"然后我删除了“use_frameworks!” line from the pod file and the crash issue was gone.
pod 文件中的一行,崩溃问题消失了。
How do I resolve the crash issue while having "use_frameworks!"如何在使用“use_frameworks!”时解决崩溃问题in the pod file?
在 pod 文件中?
Please add your Pods_project_name.framework in Frameworks, Libraries, and Embedded Content请在框架、库和嵌入式内容中添加您的 Pods_project_name.framework
Tap on + button and select your Pods_project_name.framework点击 + 按钮并选择您的 Pods_project_name.framework
I always solve these issues with CocoaPods by trying我总是通过尝试使用 CocoaPods 解决这些问题
pod deintegrate
pod install
This rebuilds the entire cocoapods project这将重建整个 cocoapods 项目
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.