After defining my Intents Definition File I can access the Swift generated classes in my Intents Extension
Also I've ensured the generated classes are members of the main app target.
In the intent handler I can see it's properly defined
Pointing to this declaration
I don't really understand where this file is located, is it generated at compile time? In any case, in my app delegate I would like to handle this intent like so
But it's not imported, how do I link it to the main app target?
It's generated.
Just define a protocol for the generated class
protocol CreateReminderConfig {}
And add the following in swift:
extension CreateReminderIntent: CreateReminderConfig {}
Then, compare the class to match the protocol instead of that class.
That class is generated and it might be not the same as a normal class in switch or the visibility/usage is limited.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.