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

问题排查

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

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

小结

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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值