Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to launch home screen widget in iOS 14 Simulator

Tags:

widget

ios14

Error Details:

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)

like image 634
Anupam Mishra Avatar asked Aug 17 '20 12:08

Anupam Mishra


2 Answers

likely because you changed the kind string inside of your :widget struct. Go to edit your scheme, and in arguments, change the name of _XCWidgetKind to one of your new kind names. Literally just loaded this fix into my simulator as i typed this lol.

like image 94
Jacob Tepperman Avatar answered Sep 19 '22 09:09

Jacob Tepperman


If you have multiple widgets, in my case I have two widget.

  1. Static Configuration widget
  2. Intent Configuration widget

And, when you run your widget extension target, you need to specify which widget you want to run.

Product -> Scheme -> Edit scheme

  1. Enable _XCWidgetKind and provide the wiget struct name [in my case "Selectable_OTP_Extn"]
  2. Enable XCWidgetDefaultView & _XCWidgetFamily

enter image description here

like image 39
Azhagusundaram Tamil Avatar answered Sep 18 '22 09:09

Azhagusundaram Tamil