• Xcode 真机调试之Unable to install “xxx“,Code: -402653103


    背景

    Xcode14.0,使用Cocoapods引入三方库后编译成功运行项目报无法安装

    无法安装

    Details

    Details
    
    Unable to install "HHTestGenerate"
    Domain: com.apple.dt.MobileDeviceErrorDomain
    Code: -402653103
    User Info: {
        DVTErrorCreationDateKey = "2023-09-11 06:32:37 +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                     0x000000010e8082bc DTDKCreateNSErrorFromAMDErrorCode + 300
    	1   DTDeviceKitBase                     0x000000010e83c3c0 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 136
    	2   DVTFoundation                       0x00000001063cdec8 DVTInvokeWithStrongOwnership + 76
    	3   DTDeviceKitBase                     0x000000010e83c144 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1196
    	4   IDEiOSSupportCore                   0x0000000110373c08 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.147 + 2328
    	5   DVTFoundation                       0x00000001064d8784 __DVT_CALLING_CLIENT_BLOCK__ + 16
    	6   DVTFoundation                       0x00000001064d91f0 __DVTDispatchAsync_block_invoke + 152
    	7   libdispatch.dylib                   0x00000001a32459dc _dispatch_call_block_and_release + 32
    	8   libdispatch.dylib                   0x00000001a3247504 _dispatch_client_callout + 20
    	9   libdispatch.dylib                   0x00000001a324ebbc _dispatch_lane_serial_drain + 672
    	10  libdispatch.dylib                   0x00000001a324f708 _dispatch_lane_invoke + 384
    	11  libdispatch.dylib                   0x00000001a325a34c _dispatch_workloop_worker_thread + 652
    	12  libsystem_pthread.dylib             0x00000001a33ca100 _pthread_wqthread + 288
    	13  libsystem_pthread.dylib             0x00000001a33c8e20 start_wqthread + 8
    );
    }
    --
    
    Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
        "device_model" = "iPhone12,1";
        "device_osBuild" = "16.2 (20C65)";
        "device_platform" = "com.apple.platform.iphoneos";
        "launchSession_schemeCommand" = Run;
        "launchSession_state" = 1;
        "launchSession_targetArch" = arm64;
        "operation_duration_ms" = 1243;
        "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.1";
        "sdk_osVersion" = "16.1";
        "sdk_variant" = iphoneos;
    }
    --
    
    
    System Information
    
    macOS Version 13.0.1 (Build 22A400)
    Xcode 14.1 (21534.1) (Build 14B47b)
    Timestamp: 2023-09-11T14:32:37+08:00
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95

    问题排查

    刚开始项目正常运行,安装三方库后开始报无法安装,老项目无此问题,定位到是三方库后排查时info.plist文件导致

    在这里插入图片描述
    一种情况是将PROJECT-Pods里面的Generate Info.plist File 设置成Yes可以解决这个问题,设置后所有三方库的此参数都会置为Yes

    小结

    目前发现有的老项目这个参数为No也可以运行,有点疑惑,再遇到问题会及时同步

  • 相关阅读:
    Linux-磁盘分区,挂载
    自动化测试面试题
    深度学习入门(二十)深度学习计算——读写文件
    螯合物前体肽c(RGD)环肽:DOTA-c(RGDfK)
    【计算机毕业设计】基于netty的网关推送平台
    Open AI开发者大会:AI“科技春晚”
    【数据结构】手撕双向链表
    (四)Redis高级(删除策略、服务器配置、高级数据类型)
    JSP快速入门
    猿创征文|date-fns 小时助手函数
  • 原文地址:https://blog.csdn.net/C_calary/article/details/132806422