iOS 16模拟器:在模拟器上运行应用程序会导致".xpc错误"。

12

在更新到macOS 13.0 Beta并安装Xcode 14.0 Beta后,我们运行一个将目标操作系统设置为16的应用程序。出现以下错误:

iPhones模拟器手动启动时也无法启动:

enter image description here

这里是描述问题的详细错误消息:
Details

The operation couldn’t be completed. xpc error
Domain: NSPOSIXErrorDomain
Code: 64
Failure Reason: xpc error
User Info: {
    DVTErrorCreationDateKey = "2022-06-17 16:19:12 +0000";
    IDERunOperationFailingWorker = IDELaunchiPhoneSimulatorLauncher;
}
--

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone14,3";
    "device_osBuild" = "16.0 (20A5283p)";
    "device_platform" = "com.apple.platform.iphonesimulator";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = "x86_64";
    "operation_duration_ms" = 44430;
    "operation_errorCode" = 64;
    "operation_errorDomain" = NSPOSIXErrorDomain;
    "operation_errorWorker" = IDELaunchiPhoneSimulatorLauncher;
    "operation_name" = IDERunOperationWorkerGroup;
    "param_consoleMode" = 0;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 3;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphonesimulator";
    "param_diag_MainThreadChecker_stopOnIssue" = 0;
    "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    "param_diag_MallocStackLogging_enableForXPC" = 1;
    "param_diag_allowLocationSimulation" = 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" = "iphonesimulator16.0";
    "sdk_osVersion" = "16.0";
    "sdk_variant" = iphonesimulator;
}
--


System Information

macOS Version 13.0 (Build 22A5266r)
Xcode 14.0 (21257.0.0.0.22) (Build 14A5228q)
Timestamp: 2022-06-17T11:19:12-05:00

在运行 iPadOS 16.0 的物理 iPad 上运行相同的应用程序不会引起任何问题。

1
请添加macOS-Ventura 13.0和Xcode 14.0标签。 - Felix Lunzenfichter
1
你找到解决方案了吗?我也遇到了同样的问题... - PumpingSalad
这里也有同样的问题 - Ventura 13.3,XCode 14.3 - 无法运行任何 iOS 16.X 模拟器,唯一能工作的是 iOS 15.2。 - Wyllys
5个回答

20
我遇到了类似的问题,并像下面这样解决: 关于本机>存储>管理>开发人员和打开屏幕,删除所有缓存,然后应该可以正常工作。
(以下为图片翻译)屏幕截图

2
修复了问题并节省了一些磁盘空间! - Elyakim Levi
在我的Ventura上,使用Xcode RC2可以正常工作。 - Scaraux

3

这个错误很可能代表系统应用程序(在iOS中为SpringBoard)崩溃,而此时Xcode正在试图启动您的应用程序。当然可能还有其他原因,但自Xcode 14以来,我分析的每个报告都与SpringBoard终止相关(要么是它本身崩溃,要么是由于另一个进程的崩溃,如SimMetalHost而被关闭)。

如果您遇到此问题,请在此状态下收集以下数据(通过在Terminal.app中运行以下命令)(不要退出Simulator.app):

  1. sudo sysdiagnose
  2. xcrun simctl diagnose

http://bugreport.apple.com上提交反馈助手报告,包括上述两个命令生成的tarballs。如果您想让我将您的FB报告连接回来,或者您对您的特定情况有疑问,请随时在此处添加评论。


1

通过在Xcode中创建一个新的模拟器并选择可用的操作系统版本,我解决了这个问题。

我认为该操作系统版本不再可用(可能被错误删除了)。

希望这对你也有用!


0

这对我有效: 1.卸载Xcode 2.重新安装Xcode


1
哇,基本上我们需要浪费24小时来修复这个问题...为什么苹果...为什么... - Shawn Frank
不必卸载整个Xcode,您可以只卸载特定的iOS平台(Xcode->首选项->平台),然后再次安装以重置模拟器。这比进行整个Xcode安装要快得多。 - marika.daboja

-3

这个问题已经解决了,打开Finder > 应用程序 > Xcode-beta > 右键单击 > 获取信息 > 勾选“使用Rosetta打开”


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接