库缺少必需的代码签名 [英] Required code signature missing for a library

查看:294
本文介绍了库缺少必需的代码签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Xcode 8中使用Swift 3.0,在运行我的应用程序时遇到此错误。我使用了第三方库 SlideMenuController

I am using Swift 3.0 in Xcode 8 and facing this error when running my app. I have used third party library SlideMenuController.

当我运行我的应用程序时,我一次又一次地遇到这个错误,但没有找到任何解决方案。

When I run my app I encounter this error again and again but didn't found any solution.

删除派生数据可以工作一段时间,但并非总是如此。

Deleting derived data works some time but not always.


/ Users / amsyt014 / Library / Developer / CoreSimulator / Devices / 8615687B-36F4-4367-9289-C265F3DABDD5 / data / Containers / Bundle / Application / 4794E2EF- $ 8 $ b'/ Users / amsyt014 / Library / Developer / CoreSimulator / Devices / 8615687B-36F4:

$ / $ -4367-9289-C265F3DABDD5 / data / Containers / Bundle / Application / 4794E2EF-863E-4836-A8E7-5A0F0ABA52E0 / Shopaves.app / Frameworks / SlideMenuControllerSwift.framework / SlideMenuControllerSwift'

/Users/amsyt014/Library/Developer/CoreSimulator/Devices/8615687B-36F4-4367-9289-C265F3DABDD5/data/Containers/Bundle/Application/4794E2EF-863E-4836-A8E7-5A0F0ABA52E0/Shopaves.app/Frameworks/SlideMenuControllerSwift.framework/SlideMenuControllerSwift: required code signature missing for '/Users/amsyt014/Library/Developer/CoreSimulator/Devices/8615687B-36F4-4367-9289-C265F3DABDD5/data/Containers/Bundle/Application/4794E2EF-863E-4836-A8E7-5A0F0ABA52E0/Shopaves.app/Frameworks/SlideMenuControllerSwift.framework/SlideMenuControllerSwift'


推荐答案

方法1

执行以下步骤


  1. 从移动设备或模拟器中删除应用程序(无论你在哪里遇到这个问题)。

  2. 在项目导航器中选择slideMenuController.framework,右键单击它,在Finder中点击一下。打开_CodeSignature文件夹并删除除CodeResources以外的所有文件。

  1. Delete application from mobile or simulator (wherever you are facing this issue).
  2. Select slideMenuController.framework in project navigator, right click on it, an click show in Finder. Open _CodeSignature folder and delete all files except CodeResources.

关闭Xcode,打开终端并输入以下命令

Close Xcode, open Terminal and enter the following command

rm -rf ~/Library/Developer/Xcode/DerivedData

这将从xcode中删除所有派生数据。

This will remove all derived data from xcode.

打开XCode,清理并运行应用程序。希望问题能够得到解决。

Open XCode, clean and run application. Hopefully, problem will be resolved.

方法2 (如果方法1不会工作)

Method 2 (If method 1 won't work)

将以下代码添加到您的pod文件

Add following code to your pod file

post_install do |installer|
    installer.pods_project.build_configurations.each do |config|
        config.build_settings.delete('CODE_SIGNING_ALLOWED')
        config.build_settings.delete('CODE_SIGNING_REQUIRED')
    end
end

这篇关于库缺少必需的代码签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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