Framework Pod表示未加载库

时间:2018-07-25 06:39:58

标签: swift xcode debugging

您好,我正在制作一个iOS应用程序,该应用程序使用一个称为Signature.Framework的Pod库(基本上允许您进行签名)。当我在XCode模拟器上启动该应用程序时,当我在物理设备上测试该应用程序时,一切都可以正常运行,但出现以下错误。还有什么应如何解决?

错误:

dyld: Library not loaded: @rpath/Signature.framework/Signature
  Referenced from: /var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/myapp
  Reason: no suitable image found.  Did find:
    /private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature: code signing blocked mmap() of '/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature'
    /private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature: code signing blocked mmap() of '/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature'
    /private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature: stat() failed with errno=1
    /private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature: code signing blocked mmap() of '/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature'
    /private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature: stat() failed with errno=1
(lldb) 

链接:

enter image description here

1 个答案:

答案 0 :(得分:1)

解决方案1 ​​

在我的情况下,我将Pods.framework设置为可选,并解决了该问题,.sh脚本未将其复制到设备,因此应用程序崩溃了:

Picture

解决方案2

从DerivedData中删除项目

User/YourPcName/Library/Developer/Xcode/DerivedData/ProjectNameFolder