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

M1 Mac Rosetta模式运行Xcode时Widget扩展启动崩溃问题

M1架构Mac设备通过Rosetta运行Xcode时Widget扩展运行崩溃问题

问题场景与现象

  • 涉及项目为集成了Widget扩展的Xcode项目,受环境限制,Xcode、模拟器、终端均必须以Rosetta模式运行,无法修改该运行配置
  • 构建运行主项目时,Widget不会加载到系统组件列表中
  • 选择Widget对应的Scheme在Xcode中运行时,模拟器加载应用阶段就会触发崩溃,真机调试时存在完全相同的问题
  • 对照场景验证结果:该项目在Intel芯片Mac设备上可正常运行,关闭Rosetta模式、原生运行Xcode时也可正常运行

错误日志

Xcode日志窗口输出

SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'Gabriel.Widget-Rosetta.Widget' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (Gabriel.Widget-Rosetta.Widget)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (Gabriel.Widget-Rosetta.Widget)}." UserInfo={NSLocalizedDescription=Failed to show Widget 'Gabriel.Widget-Rosetta.Widget' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (Gabriel.Widget-Rosetta.Widget)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (Gabriel.Widget-Rosetta.Widget)}., NSUnderlyingError=0x600001106010 {Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (Gabriel.Widget-Rosetta.Widget)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (Gabriel.Widget-Rosetta.Widget)}}}

Domain: DTXMessage

Code: 1

User Info: {
    DVTErrorCreationDateKey = "2022-07-06 14:45:31 +0000";
}

--
System Information

macOS Version 12.2.1 (Build 21D62)
Xcode 13.2.1 (19586) (Build 13C100)
Timestamp: 2022-07-06T15:45:31+01:00

控制台输出

libc++abi: terminating with uncaught exception of type NSException

dyld4 config: DYLD_FRAMEWORK_PATH=/Users/gabriel.soria/DD/Widget-Rosetta-bhlamdqmnxdfvtapitjtbxxspnfc/Build/Products/Debug-iphonesimulator DYLD_LIBRARY_PATH=/Users/gabriel.soria/DD/Widget-Rosetta-bhlamdqmnxdfvtapitjtbxxspnfc/Build/Products/Debug-iphonesimulator DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_NSXPCDistantObject ___nsx_pingHost:]: unrecognized selector sent to instance 0x600003948aa0'

_LSContextInitReturningError() failed with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0xf6701f12 bb1a56bb bba5f39f 3f7801a6 ... f9fe6ee0 ef307d24 }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0x9da4b2b1 56f7ac19 1a99bc21 b7ec95c2 ... c4004d14 03ef83dc }}

terminating with uncaught exception of type NSException

CoreSimulator 783.5 - Device: iPhone SE (2nd generation) (E360DB1E-33FF-45A4-926C-A6093DFB3699) - Runtime: iOS 15.2 (19C51) - DeviceType: iPhone SE (2nd generation)

问题处理结果

就该问题向苹果提交反馈工单后,得到官方明确回复:Xcode不提供Rosetta运行模式的官方支持,不存在针对该运行模式下Widget扩展崩溃问题的官方修复方案。最终只能投入工作量完成项目对Apple Silicon Mac的原生适配,解决该问题。


内容的提问来源于stack exchange,提问作者Gabriel Sória

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.27 15:27:15