网络知识 娱乐 Xcode12.3 、12.4 运行 iOS15 :The code signature version is no longer supported

Xcode12.3 、12.4 运行 iOS15 :The code signature version is no longer supported

参考链接:ios - The code signature version is no longer supported - Stack Overflow

 

用xcode 12.3 、12.4 运行 iOS15 的真机,会报:

Unable to install XXXX

问题提示:

Detail:

...

The code signature version is no longer supported  :签名方式不支持

...

System Information

macOS Version 10.15.7 (Build 19H1323)

Xcode 12.4 (17801) (Build 12D4e)

Timestamp: 2021-09-23T17:06:32+08:00

原因:

“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.

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 ...
The source of this information was the Apple Forum thread and the answer from Matt Eaton in DTS at Apple.

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.”

--翻译:

苹果已经改变了代码签名,除了plist编码的权利外,还包括DER编码的权利。这个额外的DER编码权利部分在iOS 15中是必需的,并且成为最新Xcode中的默认代码设计行为。要在具有旧版本Xcode的旧计算机上使用代码设计,请在对代码设计的调用中添加--generate-der标志。
如果通过Xcode签名,则可以将此标志添加到“其他u代码u签名u标志”设置中。
如果在命令行进行代码签名:
代码设计u分配=$(xcrun--查找代码设计u分配);出口协同设计
xcrun代码设计--生成授权订单。。。
这些信息的来源是苹果论坛的帖子和Matt Eaton在苹果DTS中的回答。
在Xcode 12.5发行说明中还提到了新的签名格式。然而,这些信息似乎并不完全正确。

总之就是一句话:

就是在iOS15中使用了新的代码签名方式,请使用Xcode 12.5来运行它

解决:

第一步:首先下载 15.0的真机包

文章地址:iOS 最新 真机包 调试包(15.0、14.8、14.7.1、14.7、14.6、14.5、)_ws1836300的博客-CSDN博客

下载地址:

https://download.csdn.net/download/ws1836300/24321922

第二步:

TARGETS--Building Setting-- OTHER_CODE_SIGN_FLAGS

在你的调试模式下 添加:

--generate-entitlement-der

如图:

 第三步:重新运行或者重启运行