I have a WidgetKit widget with an intent handler. Currently it uses hard coded values and I'm trying to extend it to work with dynamic values.
I did this successfully on another project but am struggling with this one.
Here's what I've done:
Created an Intent Handler target
Added a custom type
Added that type as a parameter
Added the intent definition as a member of the new target
There is a custom class name for the intent
Custom code is successfully generated
Set the
IntentHander
class to implementThemeSelectionIntentHandling
As you can see, this fails with the error Cannot find type 'ThemeSelectionIntentHandling' in scope
.
The target that fails is the Intent Handler:
/Users/lewissmith/code/wtw-ios-app/WTWIntents/IntentHandler.swift:12:3: error: cannot find type 'ThemeSelectionIntentHandling' in scope
, ThemeSelectionIntentHandling {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Command EmitSwiftModule failed with a nonzero exit code
If I remove implementing ThemeSelectionIntentHandling
then it builds as expected.
DTS won't help me because the project uses Cocoapods.
Does anyone have any ideas?