dyld: Library not loaded: @rpath/ ... 原因:找不到合适的图像。将设备更新到最新更新 13.3.1

dyld: Library not loaded: @rpath/ ... Reason: no suitable image found. updated device to latest update 13.3.1

我刚刚将我的测试设备从 13.1.2 更新到最新更新 13.3.1。 (在 13.1.2 应用程序更新之前,设备中 运行 没有任何错误)。现在我得到了要构建的项目,但是在启动屏幕之后我收到一条错误消息:

dyld: Library not loaded: @rpath/AWSCognito.framework/AWSCognito
Referenced from: /private/var/containers/Bundle/Application/EE997A49-F99F-42B0-BBF8-FDC1FF967F84/demo.app/test demo
Reason: no suitable image found.  Did find:

/private/var/containers/Bundle/Application/EE997A49-F99F-42B0-BBF8-FDC1FF967F84/test demo.app/Frameworks/AWSCognito.framework/AWSCognito: code signature invalid for '/private/var/containers/Bundle/Application/EE997A49-F99F-42B0-BBF8-FDC1FF967F84/test demo.app/Frameworks/AWSCognito.framework/AWSCognito'

/private/var/containers/Bundle/Application/EE997A49-F99F-42B0-BBF8-FDC1FF967F84/test demo.app/Frameworks/AWSCognito.framework/AWSCognito: code signature invalid for '/private/var/containers/Bundle/Application/EE997A49-F99F-42B0-BBF8-FDC1FF967F84/test demo.app/Frameworks/AWSCognito.framework/AWSCognito'

/private/var/containers/Bundle/Application/EE997A49-F99F-42B0-BBF8-FDC1FF967F84/test demo.app/Frameworks/AWSCognito.framework/AWSCognito: stat() failed with errno=1
/private/var/containers/Bundle/Application/EE997A49-F99F-42B0-BBF8-FDC1FF967F84/test demo.app/Frameworks/AWSCognito.framework/AWSCognito: code signature invalid for '/private/var/containers/Bundle/Application/EE997A49-F99F-42B0-BBF8-FDC1FF967F84/test demo.app/Frameworks/AWSCognito.framework/AWSCognito'

/private/var/containers/Bundle/Application/EE997A49-F99F-42B0-BBF8-FDC1FF967F84/test demo.app/Frameworks/AWSCognito.framework/AWSCognito: stat() failed with errno=1
Message from debugger: failed to send the k packet

我尝试了以下解决方案

clean, build and then run the project. did not Work for me.

清理并重新安装 pods

删除派生数据并重新安装pods

仍然正常工作(13.1.2以后的版本没有任何错误提示)

Select 嵌入此框架的目标,然后转到 常规 选项卡,然后转到 框架、库和嵌入式内容 应该列出出现此错误的框架,并且 select 选项 Embed & Sign。这仅适用于主要目标,但如果您将框架嵌入到另一个框架中则无效。

如果您使用的是 Cocoapods,您可以从您的 Podfile 中通过#use_frameworks!删除或评论并重新安装它,这应该可以暂时解决问题。在 运行 更新 13.3.1 设备上的应用程序之前,不要忘记 清理构建文件夹