多个小组件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
报错信息
网友评论