如何使用无效签名修复dylib? [英] How to fix dylib with invalid signature?

查看:322
本文介绍了如何使用无效签名修复dylib?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天,我在自动代码签名后无法运行我的应用程序。看到我昨天在此处发布的问题。

Yesterday I was having an issue to run my app after auto code signing. See the question I post here yesterday.

花了一些时间调查问题后,发现框架证书以某种方式损坏了。

After spending some time to investigate the issue it turns out the framework certificate somehow corrupted.

解决方案是修复框架的无效签名。 ,这是操作方法。

The solution is to fix the invalid signature for the framework, and here is how to do so.

P.S。我们可以确定的一件事是,我们确实勾选了复制时登录 复选框。

P.S. One thing we are certain is that we did tick the Sign On Copy checkbox.

推荐答案

注意: VideoBuilderLibrary 是我们构建的自定义框架。

NOTE: VideoBuilderLibrary is a custom framework we built.

要测试代码符号状态,

# Replace the framework to yours
codesign -v 
frameworks/VideoBuilderLibrary.framework/Frameworks/libavutil.55.dylib
[no output]

如果存在无效签名,

codesign -v 
frameworks/VideoBuilderLibrary.framework/Frameworks/libavutil.55.dylib
frameworks/VideoBuilderLibrary.framework/Frameworks/libavutil.55.dylib: 
invalid signature (code or signature have been modified)
In architecture: x86_64

要在framewor中放弃所有 dylib 文件并解决此问题,请在下面运行命令,将您的证书名替换为您的证书文件名,

To resigned all dylib files in a framewor and fix this, run command below with "YOUR CERTIFICATE NAME" replaced with your cert file name,

cd frameworks/VideoBuilderLibrary.framework/Frameworks
ls | xargs codesign -f -s "YOUR CERTIFICATE NAME"

这篇关于如何使用无效签名修复dylib?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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