iossirikit

Can you resolve a Siri activity param in the main app?


I know it's possible to share code between the intents extension and the app, but what if the app itself needs to complete the validation of an activity param according to current context? Let's say an activity is successfully resolved with a param between 1 and 10, but from what's actually going on in the app it should be limited between 1 and 5. Does the app have the chance to reject the activity and let Siri know the actual valid options in the current scenario?


Solution

  • So it turns what I need is for the intents extension to be able to resolve that param by having more of the actual app's capabilities, in my case that means access to the app's database and maybe user defaults etc. To this end I can have my DB in a location shared by the app group. To share the DB model and any logic I can use a framework.