iOS中多个widget调试时候不桌面不显示小组件

多个小组件debug时候报错

SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'com.example.apple-samplecode.Emoji-Rangers.Intermediate' 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: 'EmojiRangerWidget', 'LeaderboardWidget'" UserInfo={NSLocalizedDescription=Please specify the widget kind in the scheme's Environment Variables using the key '_XCWidgetKind' to be one of: 'EmojiRangerWidget', 'LeaderboardWidget'}." UserInfo={NSLocalizedDescription=Failed to show Widget 'com.example.apple-samplecode.Emoji-Rangers.Intermediate' 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: 'EmojiRangerWidget', 'LeaderboardWidget'" UserInfo={NSLocalizedDescription=Please specify the widget kind in the scheme's Environment Variables using the key '_XCWidgetKind' to be one of: 'EmojiRangerWidget', 'LeaderboardWidget'}., NSUnderlyingError=0x7fda3f064360 {Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=2 "Please specify the widget kind in the scheme's Environment Variables using the key '_XCWidgetKind' to be one of: 'EmojiRangerWidget', 'LeaderboardWidget'" UserInfo={NSLocalizedDescription=Please specify the widget kind in the scheme's Environment Variables using the key '_XCWidgetKind' to be one of: 'EmojiRangerWidget', 'LeaderboardWidget'}}}

XCWidgetKind字段填上任意一个widget名字,否则多个widget找不到具体启动哪一个

可以参考官网解决方案

com.apple.dt.deviceprocesscontrols… | Apple Developer Forums

报错信息
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容