首页 > 解决方案 > 在 iPhone 12 上构建应用程序时不再支持此代码签名

问题描述

另一个标题类似的帖子上的解决方案:不再支持代码签名版本不起作用。

我曾经能够将我的应用程序安装到我的手机上。我更新了我的手机,然后我更新了 xCode,以便我可以将它安装到 IOS 14.6,现在我得到这个代码签名版本不再支持错误。它在模拟器上运行良好,但在我的手机上却不行。

我得到这个错误输出:

Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620375
--
The code signature version is no longer supported.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620375
User Info: {
DVTRadarComponentKey = 261622;
MobileDeviceErrorCode = "(0xE8008029)";
"com.apple.dtdevicekit.stacktrace" = (
0  DTDeviceKitBase  0x000000011cf093b8 DTDKCreateNSErrorFromAMDErrorCode + 220
1  DTDeviceKitBase  0x000000011cf47ae1 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
2  DVTFoundation  0x000000010d602bac DVTInvokeWithStrongOwnership + 71
3  DTDeviceKitBase  0x000000011cf47822 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1440
4  IDEiOSSupportCore  0x0000000122c3c999 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.294 + 3534
5  DVTFoundation  0x000000010d735921 __DVT_CALLING_CLIENT_BLOCK__ + 7
6  DVTFoundation  0x000000010d73754b __DVTDispatchAsync_block_invoke + 1191
7  libdispatch.dylib  0x00007fff2019a5dd _dispatch_call_block_and_release + 12
8  libdispatch.dylib  0x00007fff2019b7c7 _dispatch_client_callout + 8
9  libdispatch.dylib  0x00007fff201a15fe _dispatch_lane_serial_drain + 606
10 libdispatch.dylib  0x00007fff201a20cb _dispatch_lane_invoke + 375
11 libdispatch.dylib  0x00007fff201abc5d _dispatch_workloop_worker_thread + 819
12 libsystem_pthread.dylib  0x00007fff20343499 _pthread_wqthread + 314
13 libsystem_pthread.dylib  0x00007fff20342467 start_wqthread + 15
);
}
--
System Information
macOS Version 11.0.1 (Build 20B29)
Xcode 12.5.1 (18212) (Build 12E507)
Timestamp: 2021-08-25T17:09:00-07:00 ```

标签: iosiphonexcode

解决方案


In Xcode, Add the --generate-entitlement-der to your OTHER_CODE_SIGN_FLAGS under Build Settings in your target.

If it still doesn't work.

Go to Targets => General => Frameworks, Libraries, and Embedded Content

  1. Find the frameworks that are set to 'Embed & Sign'
  2. Show in Finder of this Framework / xcFramework (both Framework / xcFramework can have static and dynamic frameworks so we need to find which is static one)
  3. In Terminal run file ***.framework
    (If you are using xcFramework check the file with framework extension. Example path would like as Test.xcframework/ios-arm64_armv7/Test.framework)
  4. If it says Shared Library / Mach-O 64-bit dynamically linked shared library arm64. Don't do anything to the setting.
  5. If it says current ar archive,then it is a static library, just need to change it from Embed & Sign to Do Not Embed.
  6. Repeat for all embedded frameworks

It should work fine


推荐阅读