You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法在真机安装或临时分发App,模拟器运行正常

解决Xcode真机运行提示“未找到此可执行文件的有效描述文件”问题

问题概述

模拟器运行应用正常,但通过USB连接iPhone真机运行时,Xcode抛出错误:A valid provisioning profile for this executable was not found.,对应错误代码-402620395(MobileDevice错误码0xE8008015)。环境信息:

  • Xcode 14.1
  • 最新版CocoaPods和Ruby
  • 应用与模拟器均适配iOS 16

解决步骤

  • 检查项目签名配置

    1. 打开Xcode,选中项目根目录,进入Signing & Capabilities标签页
    2. 确认Team选项已选中你的Apple开发者账号(个人/团队)
    3. 勾选Automatically manage signing,让Xcode自动生成管理描述文件;若手动管理,需确保已导入对应Bundle ID的有效描述文件
  • 刷新本地描述文件

    1. 打开Xcode偏好设置(Xcode > Settings),进入Accounts标签
    2. 选中你的开发者账号,点击右下角Download Manual Profiles,等待Xcode同步最新描述文件
    3. 返回项目Signing & Capabilities,确认Provisioning Profile下拉菜单中出现匹配的有效文件
  • 清理缓存并重新构建

    1. 执行Product > Clean Build Folder(快捷键Cmd+Shift+K)清理构建缓存
    2. 断开并重新连接iPhone设备
    3. 重新执行Product > Run尝试安装
  • 确认设备信任设置

    1. 在iPhone上打开设置 > 通用 > VPN与设备管理
    2. 找到你的开发者账号条目,点击选择信任,完成验证后重启设备再尝试运行
  • 核对Bundle ID一致性

    1. 确认项目Signing & Capabilities中的Bundle Identifier与Apple开发者后台(Certificates, Identifiers & Profiles)注册的App ID完全一致
    2. 若修改过Bundle ID,需在开发者后台更新对应App ID,并重新生成描述文件

完整错误日志

Unable to install "Runner"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620395
User Info: {
    DVTErrorCreationDateKey = "2022-12-07 17:43:42 +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                     0x000000010d3afc90 DTDKCreateNSErrorFromAMDErrorCode + 235
    1   DTDeviceKitBase                     0x000000010d3ec2ee __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
    2   DVTFoundation                       0x0000000102e4ac71 DVTInvokeWithStrongOwnership + 71
    3   DTDeviceKitBase                     0x000000010d3ec016 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1409
    4   IDEiOSSupportCore                   0x000000010d0cd780 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.301 + 3520
    5   DVTFoundation                       0x0000000102f80879 __DVT_CALLING_CLIENT_BLOCK__ + 7
    6   DVTFoundation                       0x0000000102f8138d __DVTDispatchAsync_block_invoke + 196
    7   libdispatch.dylib                   0x00007ff8016577fb _dispatch_call_block_and_release + 12
    8   libdispatch.dylib                   0x00007ff801658a44 _dispatch_client_callout + 8
    9   libdispatch.dylib                   0x00007ff80165eac4 _dispatch_lane_serial_drain + 694
    10  libdispatch.dylib                   0x00007ff80165f5b4 _dispatch_lane_invoke + 366
    11  libdispatch.dylib                   0x00007ff801669ad7 _dispatch_workloop_worker_thread + 762
    12  libsystem_pthread.dylib             0x00007ff8017d4ce3 _pthread_wqthread + 326
    13  libsystem_pthread.dylib             0x00007ff8017d3c67 start_wqthread + 15
);
}
--

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone8,2";
    "device_osBuild" = "15.7.1 (19H117)";
    "device_platform" = "com.apple.platform.iphoneos";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 14739;
    "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_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: 2022-12-07T18:43:42+01:00

内容的提问来源于stack exchange,提问作者thefrankie

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.09 05:50:24