Xcode14.3 -无法安装-找不到此可执行文件的有效配置文件

9gm1akwq  于 2023-06-24  发布在  其他
关注(0)|答案(1)|浏览(232)

物理设备(iPhone 12 pro)连接到Xcode。按照预期设置配置文件、团队和证书。如果我从Xcode运行应用程序,应用程序在手机上启动没有任何问题。
然后停止设备上正在运行的调试会话。并尝试在物理设备上再次启动它(不对项目或代码进行任何更改)。在这一点上,我得到以下错误:

细节会给予我:

Details

Unable to install "App"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620395
User Info: {
    DVTErrorCreationDateKey = "2023-06-15 11:24:15 +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                     0x000000010aeacb1c DTDKCreateNSErrorFromAMDErrorCode + 300
    1   DTDeviceKitBase                     0x000000010aee1000 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 136
    2   DVTFoundation                       0x000000010217bac8 DVTInvokeWithStrongOwnership + 76
    3   DTDeviceKitBase                     0x000000010aee0d7c -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1208
    4   IDEiOSSupportCore                   0x000000010b9ebce8 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.147 + 2340
    5   DVTFoundation                       0x0000000102286428 __DVT_CALLING_CLIENT_BLOCK__ + 16
    6   DVTFoundation                       0x0000000102286e94 __DVTDispatchAsync_block_invoke + 152
    7   libdispatch.dylib                   0x000000018031a874 _dispatch_call_block_and_release + 32
    8   libdispatch.dylib                   0x000000018031c400 _dispatch_client_callout + 20
    9   libdispatch.dylib                   0x0000000180323a88 _dispatch_lane_serial_drain + 668
    10  libdispatch.dylib                   0x00000001803245f8 _dispatch_lane_invoke + 384
    11  libdispatch.dylib                   0x000000018032f244 _dispatch_workloop_worker_thread + 648
    12  libsystem_pthread.dylib             0x00000001804c8074 _pthread_wqthread + 288
    13  libsystem_pthread.dylib             0x00000001804c6d94 start_wqthread + 8
);
}
--

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone13,3";
    "device_osBuild" = "16.5 (20F66)";
    "device_platform" = "com.apple.platform.iphoneos";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 2393;
    "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_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphoneos16.4";
    "sdk_osVersion" = "16.4";
    "sdk_variant" = iphoneos;
}
--

System Information

macOS Version 13.3.1 (a) (Build 22E772610a)
Xcode 14.3 (21812) (Build 14E222b)
Timestamp: 2023-06-15T13:24:15+02:00

解决这个问题的唯一方法是在此时将构建设置Enable App Sandbox设置为“YES”并运行它,然后停止构建。将Enable App Sandbox设置回“NO”并在设备上启动它。然后应用程序将在我的设备上更新并成功启动。但任何后续启动都将弹出相同的错误“无法安装”。在这一点上,我被迫重复'变通办法'或关闭Xcode并重新打开它。
但这对我来说不是一个可行的解决方案,而且会占用太多的开发时间。
有人见过这种行为吗?

ttp71kqs

ttp71kqs1#

在我的情况下,原因是实际设备(iPhone SE3)没有配置文件。我从苹果商店安装了苹果配置器,在用苹果配置器添加了开发配置文件后,我就可以安装它了。

相关问题