This link demonstrates that we should be able to handle custom intents in-app.
My first question is that can this be done for system intents too? That is, can we avoid making an intent extension altogether and handle a system intent directly in app?
Also, I am facing some issue trying to implement SiriKit for my tvOS app. I have tried the following:
- Added Siri in
Signing & Capabilitiesin.xcodeprojfile of my app. - Added
Privacy - Siri Usage Descriptionstring inpInfo.list. - Called the
requestSiriAuthorizationfunction in my app code flow. Because of the above 3 steps, a pop up appears on my app asking the user to grant authorization to use Siri which I allow. - I also implemented my
handlerForIntentin my app delegate:
- (nullable id)application:(UIApplication *)application
handlerForIntent:(INIntent *)intent
{
NSLog(@"handlerForIntent Enter - [DEBUG_STRING]");
return NULL;
}
I am not returning any handler for now because I just want this function to be triggered somehow however, that is not happening.
- I added a system intent in the
Supports Intentof the target. Specifically, theINAddTasksIntent. I haven't added any code pertaining to resolving, confirming or handling of this specific intent. My entire concern for now is to catch the intent inhandlerForIntentfunction given above. As per this documentation , I should be able to invoke this intent using the phrases given in the link. However, this doesn't work. Is it because I need to implement an intents extension for this particular intent? - Since, the previous step for system intent didn't work, I went to try out the custom intent in-app handling that was mentioned in the first link. Here, I added a custom intent of
Searchcategory, following the steps in the link. And I added the custom intent in theSupported Intentslist. However, I don't think these changes are taking effect as I cannot seem to get the symbols for this custom intent. Do I have to configure some build setting to generate the symbols for the custom intent?
If someone can help in what exactly am I missing here, it'll be very helpful.
Many thanks.