Xcode 真机调试之 Unable to install “xxx“
Posted 茉莲晨曦
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Xcode 真机调试之 Unable to install “xxx“相关的知识,希望对你有一定的参考价值。
真机调试出现 unable to install “xxx”
Details
Unable to install "xxx"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620395
User Info:
DVTErrorCreationDateKey = "2022-11-25 06:51:26 +0000";
IDERunOperationFailingWorker = IDEInstalliPhoneLauncher;
--
A valid provisioning profile for this executable was not found.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620395
User Info:
DVTRadarComponentKey = 487925;
MobileDeviceErrorCode = "(0xE8008015)";
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x0000000116acd9d1 DTDKCreateNSErrorFromAMDErrorCode + 220
1 DTDeviceKitBase 0x0000000116b09ce7 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
2 DVTFoundation 0x000000010aa027d6 DVTInvokeWithStrongOwnership + 71
3 DTDeviceKitBase 0x0000000116b09a1d -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1422
4 IDEiosSupportCore 0x00000001123ea668 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.301 + 3414
5 DVTFoundation 0x000000010ab343d4 __DVT_CALLING_CLIENT_BLOCK__ + 7
6 DVTFoundation 0x000000010ab354bc __DVTDispatchAsync_block_invoke + 372
7 libdispatch.dylib 0x00007ff8187d50cc _dispatch_call_block_and_release + 12
8 libdispatch.dylib 0x00007ff8187d6317 _dispatch_client_callout + 8
9 libdispatch.dylib 0x00007ff8187dc317 _dispatch_lane_serial_drain + 672
10 libdispatch.dylib 0x00007ff8187dcdfd _dispatch_lane_invoke + 366
11 libdispatch.dylib 0x00007ff8187e6eee _dispatch_workloop_worker_thread + 753
12 libsystem_pthread.dylib 0x00007ff818989fd0 _pthread_wqthread + 326
13 libsystem_pthread.dylib 0x00007ff818988f57 start_wqthread + 15
);
--
Analytics Event: com.apple.dt.IDERunOperationWorkerFinished :
"device_model" = "iPhone7,1";
"device_osBuild" = "12.5.4 (16H50)";
"device_platform" = "com.apple.platform.iphoneos";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 14211;
"operation_errorCode" = "-402620395";
"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.1";
"param_runnable_type" = 2;
"param_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "iphoneos15.5";
"sdk_osVersion" = "15.5";
"sdk_variant" = iphoneos;
--
System Information
macOS Version 12.4 (Build 21F79)
Xcode 13.4.1 (20504) (Build 13F100)
Timestamp: 2022-11-25T14:51:26+08:00
代码错误
错误代码 可能错误原因
402653103: 错把静态库加载成动态库
402653415: 免费app达到最大数目
402652994: 设备装有相同bundle id的应用
402653150: iOS设备要用xcode12来调试
402653170: 测试设备运行内存不足,退出部分或者所有后台应用试试
402620395: 用dis证书来dev调试
402620375 打包macOS版本低于11,需要更新macOS版本或者设置--generate-entitlement-der(调用codesign之前调用或者在xcode->OTHER_CODE_SIGN_FLAGS设置)
我的是402620395,buile中把release改成debug就可以了
以上是关于Xcode 真机调试之 Unable to install “xxx“的主要内容,如果未能解决你的问题,请参考以下文章
Xcode真机调试失败:The identity used to sign the executable is no longer valid
com.android.ddmlib.InstallException: Unable to upload some APKs?
iOS开发之—— XCODE真机调试设备连接一直忙碌如何处理!
更新xcode8后真机调试报code signing is required for product type 'xxxxx' in SDK 'iOS 10.0'(示例