Xcode 真機調(diào)試 Unable to install “xxx“

真機調(diào)試出現(xiàn) unable to install “xxx”

image.png
Details

Unable to install "XXX"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653103
User Info: {
    DVTErrorCreationDateKey = "2023-05-06 08:55:04 +0000";
    IDERunOperationFailingWorker = IDEInstalliPhoneLauncher;
}
--
Could not inspect the application package.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653103
User Info: {
    DVTRadarComponentKey = 282703;
    MobileDeviceErrorCode = "(0xE8000051)";
    "com.apple.dtdevicekit.stacktrace" = (
    0   DTDeviceKitBase                     0x0000000114b1bc90 DTDKCreateNSErrorFromAMDErrorCode + 235
    1   DTDeviceKitBase                     0x0000000114b582ee __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
    2   DVTFoundation                       0x00000001090f3e01 DVTInvokeWithStrongOwnership + 71
    3   DTDeviceKitBase                     0x0000000114b58016 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1409
    4   IDEiOSSupportCore                   0x00000001139887a0 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.301 + 3520
    5   DVTFoundation                       0x0000000109229a09 __DVT_CALLING_CLIENT_BLOCK__ + 7
    6   DVTFoundation                       0x000000010922a51d __DVTDispatchAsync_block_invoke + 196
    7   libdispatch.dylib                   0x00007ff80f2a70cc _dispatch_call_block_and_release + 12
    8   libdispatch.dylib                   0x00007ff80f2a8317 _dispatch_client_callout + 8
    9   libdispatch.dylib                   0x00007ff80f2ae317 _dispatch_lane_serial_drain + 672
    10  libdispatch.dylib                   0x00007ff80f2aedfd _dispatch_lane_invoke + 366
    11  libdispatch.dylib                   0x00007ff80f2b8eee _dispatch_workloop_worker_thread + 753
    12  libsystem_pthread.dylib             0x00007ff80f45bfd0 _pthread_wqthread + 326
    13  libsystem_pthread.dylib             0x00007ff80f45af57 start_wqthread + 15
);
}
--

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone6,2";
    "device_osBuild" = "12.5.6 (16H71)";
    "device_platform" = "com.apple.platform.iphoneos";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 6403;
    "operation_errorCode" = "-402653103";
    "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_checker_tpc_enable" = 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_type" = 2;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphoneos16.2";
    "sdk_osVersion" = "16.2";
    "sdk_variant" = iphoneos;
}
--


System Information

macOS Version 12.6.3 (Build 21G419)
Xcode 14.2 (21534) (Build 14C18)
Timestamp: 2023-05-06T16:55:04+08:00


代碼錯誤

錯誤代碼 可能錯誤原因

402653103: 錯把靜態(tài)庫加載成動態(tài)庫
402653415: 免費app達到最大數(shù)目
402652994: 設(shè)備裝有相同bundle id的應(yīng)用
402653150: iOS設(shè)備要用xcode12來調(diào)試
402653170: 測試設(shè)備運行內(nèi)存不足,退出部分或者所有后臺應(yīng)用試試
402620395: 用dis證書來dev調(diào)試
402620375: 打包macOS版本低于11,需要更新macOS版本或者設(shè)置--generate-entitlement-der(調(diào)用codesign之前調(diào)用或者在xcode->OTHER_CODE_SIGN_FLAGS設(shè)置)
402653179: 手機內(nèi)存滿了

我的是402620395,buile中把release改成debug就可以了

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容