不再支持代码签名版本 [英] The code signature version is no longer supported

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

问题描述

使用旧版 macOS 上提供的代码签名版本签名的应用(例如 Catalina (10.15))将无法在 iOS 15 上运行,因为您可以安装的最新版本是 Xcode 12.4.Xcode 12.5 似乎改变了协同设计的行为.安装时,您会收到错误消息 不再支持代码签名版本.有解决方法吗?

An app signed with a codesign version provided on an older macOS, like Catalina (10.15) will not run on iOS 15 because the lastest version you can install is Xcode 12.4. Xcode 12.5 seems to change the behavior of codesigning. When installing you get the error message The code signature version is no longer supported. Is there a workaround?

推荐答案

codesign --generate-entitlement-der

除了 plist 编码的权利外,Apple 还更改了 codesign 签名以包含 DER 编码的权利.这个额外的 DER 编码权利部分在 iOS 15 中是必需的,并成为最新 Xcode 中 codesign 的默认行为.要在使用旧版 Xcode 的旧机器上使用 codesign,请将 --generate-entitlement-der 标志添加到您对 codesign 的调用中.

codesign --generate-entitlement-der

Apple has changed the codesign signature to include DER encoded entitlements in addition to the plist encoded entitlements. This additional DER encoded entitlements section is required in iOS 15 and becomes the default behavior of codesign in the latest Xcode. To use codesign on an older machines with an older version of Xcode add the --generate-entitlement-der flag to your call to codesign.

如果通过 Xcode 签名,您可以将此标志添加到 OTHER_CODE_SIGN_FLAGS 设置中.

If signing through Xcode, you can add this flag to the OTHER_CODE_SIGN_FLAGS setting.

如果在命令行中进行协同设计:

If codesigning at the command-line:

CODESIGN_ALLOCATE=$( xcrun --find codesign_allocate ); export CODESIGN_ALLOCATE
xcrun codesign --generate-entitlement-der ...

此信息的来源是 Apple 论坛主题和 Matt Eaton 的回答在 Apple 的 DTS 中.

The source of this information was the Apple Forum thread and the answer from Matt Eaton in DTS at Apple.

Xcode 12.5 发行说明还有对新签名格式.但是,信息似乎并不完全正确.

In the Xcode 12.5 Release Notes there is also a reference to the new signature format. However, it seems the information is not entirely correct.

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

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