Dynamic Intent Selection not Generating Handling Class for Widget?

I am trying to build my first Widget, and am following the guidance in the Making a Configurable Widget article. After confirming the default Widget runs successfully, I am trying to set up my Intent Definition and Intent Handler. I have taken the following steps;
  • Created a new intent definition file, with the custom intent's category as View, eligibility for Widgets, and the parameter set to a custom type while selecting Options are provided dynamically.

  • Created a new Intent Handler target, and set the Supported Intent's class name to something relevant, such as SelectCharacterIntent.

The article implies that the newly created IntentHandler.swift file, which has an IntentHandler class, should be able to have that class extended to the intent definition file, as noted;


Based on the custom intent definition file, Xcode generates a protocol, SelectCharacterIntentHandling, that the handler must conform to. Add this conformance to the declaration of the IntentHandler class.

However, my project immediately reports that it Cannot find type 'SelectCharacterIntentHandling' in scope.

I am unsure if I am doing something wrong, but it seems peculiar that the SelectCharacterIntentHandling protocol is created/implemented without me being aware. Surely, there must be a step to take to have that protocol created so I can extend my IntentHandler class to support my dynamic intent.

Thank you!

I had the same issue,
I fixed by adding the NSUserActivityTypes key to the main app Info.plist file with the DynamicIntent name
Please check the name of custom Intents in intentdefinition file.

Xcode generates automatically the file with class using the same name.

In addition, the default name is "Configuration".

Maybe you can try to use "ConfigurationIntentHandling".

btw.
In the General tab , check Class Name is the same.

Hope help.
Having the same issue. Xcode Version 12.0 (12A7209).
Followed the exact steps suggested here and SelectCharacterIntentHandling file is never created.

Any help will be appreciated.
It says its auto generated, which it is after you make the intent. its not hidden in the xcode binary. for instance, i made a .intentdefinition file and created a custom intent called NoteConfiguration, save, close and open xcode and then the class NoteConfigurationIntent is made, as well as the protocol NoteConfigurationIntentHandling is then made. hope that helps.
Check Target Membership of .intentdefinition file in your Widget Extension.
Dynamic Intent Selection not Generating Handling Class for Widget?
 
 
Q