flutter Xcode无法将应用程序安装到iPhone(iOS 14. 6):不再支持该代码签名版本

mwngjboj  于 2023-03-13  发布在  Flutter
关注(0)|答案(3)|浏览(188)

我在iOS项目中使用了flutter模块,我无法在iPhone12(iOS14.6)上运行我的项目,但iPhone XS(iOS14.3)可以,我的项目中使用的flutter模块处于发布模式。
很担心,因为截稿日期快到了。救命啊!谢谢!
环境:
macOS版本12.2.1(内部版本号21 D 62)
xcode 13.3.1(20103)(构建版本13 E500 a)
Flutter3.0
错误信息:

Details

Unable to install "ios_host"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620375
User Info: {
    DVTErrorCreationDateKey = "2022-05-18 06:44:44 +0000";
    IDERunOperationFailingWorker = IDEInstalliPhoneLauncher;
}
--
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                     0x00000001270079d1 DTDKCreateNSErrorFromAMDErrorCode + 220
    1   DTDeviceKitBase                     0x0000000127043ce7 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
    2   DVTFoundation                       0x000000010e254a76 DVTInvokeWithStrongOwnership + 71
    3   DTDeviceKitBase                     0x0000000127043a1d -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1422
    4   IDEiOSSupportCore                   0x0000000120dfd668 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.301 + 3414
    5   DVTFoundation                       0x000000010e386610 __DVT_CALLING_CLIENT_BLOCK__ + 7
    6   DVTFoundation                       0x000000010e3876f8 __DVTDispatchAsync_block_invoke + 372
    7   libdispatch.dylib                   0x00007ff819ae0ad8 _dispatch_call_block_and_release + 12
    8   libdispatch.dylib                   0x00007ff819ae1cc9 _dispatch_client_callout + 8
    9   libdispatch.dylib                   0x00007ff819ae7cee _dispatch_lane_serial_drain + 696
    10  libdispatch.dylib                   0x00007ff819ae87c8 _dispatch_lane_invoke + 366
    11  libdispatch.dylib                   0x00007ff819af27e1 _dispatch_workloop_worker_thread + 758
    12  libsystem_pthread.dylib             0x00007ff819c95074 _pthread_wqthread + 326
    13  libsystem_pthread.dylib             0x00007ff819c93ffb start_wqthread + 15
);
}
--

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone13,2";
    "device_osBuild" = "14.6 (18F72)";
    "device_platform" = "com.apple.platform.iphoneos";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 1251;
    "operation_errorCode" = "-402620375";
    "operation_errorDomain" = "com.apple.dt.MobileDeviceErrorDomain";
    "operation_errorWorker" = IDEInstalliPhoneLauncher;
    "operation_name" = IDEiPhoneRunOperationWorkerGroup;
    "param_consoleMode" = 0;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 5;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphoneos";
    "param_diag_MainThreadChecker_stopOnIssue" = 0;
    "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    "param_diag_MallocStackLogging_enableForXPC" = 1;
    "param_diag_allowLocationSimulation" = 1;
    "param_diag_gpu_frameCapture_enable" = 0;
    "param_diag_gpu_shaderValidation_enable" = 0;
    "param_diag_gpu_validation_enable" = 0;
    "param_diag_memoryGraphOnResourceException" = 0;
    "param_diag_queueDebugging_enable" = 1;
    "param_diag_runtimeProfile_generate" = 0;
    "param_diag_sanitizer_asan_enable" = 0;
    "param_diag_sanitizer_tsan_enable" = 0;
    "param_diag_sanitizer_tsan_stopOnIssue" = 0;
    "param_diag_sanitizer_ubsan_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 0;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 0;
    "param_launcher_substyle" = 0;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_runnable_swiftVersion" = "5.6";
    "param_runnable_type" = 2;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphoneos15.4";
    "sdk_osVersion" = "15.4";
    "sdk_variant" = iphoneos;
}
--

System Information

macOS Version 12.2.1 (Build 21D62)
Xcode 13.3.1 (20103) (Build 13E500a)
Timestamp: 2022-05-18T14:44:44+08:00
vlf7wbxs

vlf7wbxs1#

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设置。这可能会有所帮助:The code signature version is no longer supported

vhmi4jdf

vhmi4jdf2#

我自己修好的:利用CocoaPods嵌入Flutter模块(App.框架、Flutter.框架等)。

k3bvogb1

k3bvogb13#

当我不小心嵌入了一个我不应该嵌入的框架时,我就遇到了这种情况。
Flutter docs
重要提示:插件可能会生成静态或动态框架。应链接静态框架,但决不能嵌入静态框架。如果将静态框架嵌入到应用程序中,则应用程序无法发布到App Store,并且会失败,并显示“发现意外的Mach-O头代码存档"错误。
检查this question下的答案以确定哪些框架是静态的。
在目标的***常规***-〉框架、库和嵌入式内容***部分下,将静态框架更改为“不嵌入”***。

相关问题