WatchOS模拟器运行报错:应用包路径不符问题求助
WatchOS模拟器运行原生Watch应用报错:应用包路径不匹配
在WatchOS模拟器上运行原生iOS Watch应用时,构建成功但安装失败,报错:An application bundle was not found at the provided path. Provide a valid path to the desired application bundle
路径不匹配详情
Xcode尝试安装的路径:file:///Users/abdullahshahid_1/Library/Developer/Xcode/DerivedData/SIMOSA-hdnvefmzxxdlwqagsrxeojmlbnje/Build/Products/Debug-watchos/Jazz%20World%20Watch%20App.app
实际构建产物存放路径:file:///Users/abdullahshahid_1/Library/Developer/Xcode/DerivedData/SIMOSA-hdnvefmzxxdlwqagsrxeojmlbnje/Build/Products/Debug-watchsimulator/Jazz%20World%20Watch%20App.app
前者指向Debug-watchos文件夹,后者实际位于Debug-watchsimulator文件夹中。推测Xcode从TARGET_TEMP_DIR获取路径,但不知道如何修正。
已尝试的解决方案
- 清理构建文件夹
- 清除Derived Data
- 重启Mac及Xcode
以上操作均未解决问题,也未找到针对原生iOS场景的有效解决方案,特此求助。
错误详情日志
Simulator device returned an error for the requested operation. Domain: NSPOSIXErrorDomain Code: 2 Failure Reason: An application bundle was not found at the provided path. Recovery Suggestion: Provide a valid path to the desired application bundle. User Info: { DVTErrorCreationDateKey = "2024-01-08 13:24:30 +0000"; IDERunOperationFailingWorker = "_IDEInstalliPhoneSimulatorWorker"; SimCallingSelector = "installApplication:withOptions:error:"; bundleURL = "file:///Users/abdullahshahid_1/Library/Developer/Xcode/DerivedData/SIMOSA-hdnvefmzxxdlwqagsrxeojmlbnje/Build/Products/Debug-watchos/Jazz%20World%20Watch%20App.app"; } -- Failed to install the requested application Domain: NSPOSIXErrorDomain Code: 2 Failure Reason: An application bundle was not found at the provided path. Recovery Suggestion: Provide a valid path to the desired application bundle. User Info: { bundleURL = "file:///Users/abdullahshahid_1/Library/Developer/Xcode/DerivedData/SIMOSA-hdnvefmzxxdlwqagsrxeojmlbnje/Build/Products/Debug-watchos/Jazz%20World%20Watch%20App.app"; } -- Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_model" = "Watch7,4"; "device_osBuild" = "10.2 (21S364)"; "device_platform" = "com.apple.platform.watchsimulator"; "dvt_coredevice_version" = "355.7.6"; "dvt_mobiledevice_version" = "1643.40.14.100.2"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = "x86_64"; "operation_duration_ms" = 28; "operation_errorCode" = 2; "operation_errorDomain" = NSPOSIXErrorDomain; "operation_errorWorker" = "_IDEInstalliPhoneSimulatorWorker"; "operation_name" = IDERunOperationWorkerGroup; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 1; "param_destination_platform" = "com.apple.platform.watchsimulator"; "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" = 16384; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_structuredConsoleMode" = 1; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphonesimulator17.2"; "sdk_osVersion" = "17.2"; "sdk_variant" = iphonesimulator; } -- System Information macOS Version 14.1 (Build 23B74) Xcode 15.1 (22502) (Build 15C65) Timestamp: 2024-01-08T18:24:30+05:00
内容的提问来源于stack exchange,提问作者Abdullah Shahid
相关产品推荐
相关产品推荐

