错误详情:
SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'com.anupam.iOS14Feature.widgetExtension' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=2 "Please specify the widget kind in the scheme's Environment Variables using the key '_XCWidgetKind' to be one of: 'BillPayCheckerWidget', 'CommitCheckerWidget'" UserInfo={NSLocalizedDescription=Please specify the widget kind in the scheme's Environment Variables using the key '_XCWidgetKind' to be one of: 'BillPayCheckerWidget', 'CommitCheckerWidget'}." UserInfo={NSLocalizedDescription=Failed to show Widget 'com.anupam.iOS14Feature.widgetExtension' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=2 "Please specify the widget kind in the scheme's Environment Variables using the key '_XCWidgetKind' to be one of: 'BillPayCheckerWidget', 'CommitCheckerWidget'" UserInfo={NSLocalizedDescription=Please specify the widget kind in the scheme's Environment Variables using the key '_XCWidgetKind' to be one of: 'BillPayCheckerWidget', 'CommitCheckerWidget'}., NSUnderlyingError=0x7fc70d618350 {Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=2 "Please specify the widget kind in the scheme's Environment Variables using the key '_XCWidgetKind' to be one of: 'BillPayCheckerWidget', 'CommitCheckerWidget'" UserInfo={NSLocalizedDescription=Please specify the widget kind in the scheme's Environment Variables using the key '_XCWidgetKind' to be one of: 'BillPayCheckerWidget', 'CommitCheckerWidget'}}} Domain: DTXMessage Code: 1 --
System Information
macOS Version 10.15.6 (Build 19G73) Xcode 12.0 (17200.1)
最佳答案
可能是因为您更改了 :widget 结构中的 kind 字符串。去编辑您的方案,并在参数中,将 _XCWidgetKind 的名称更改为您的新种类名称之一。当我输入这个 lol 时,实际上只是将此修复程序加载到我的模拟器中。
关于widget - 无法在 iOS 14 模拟器中启动主屏幕小部件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63451273/