Monday, September 24, 2018

Siri Relevant shortcuts

In addition to donating intents that the user has performed, apps can now share customisable relevant shortcuts for Siri to recommend at appropriate time in future This means that app can attach information about when or where this action might be useful to recommend. For e.g. app can recommend this shortcut should be recommended when at the gym or at home or during the morning or evening.

There are below 3 steps involved in this

1. Create instance of INRelevantShortcut object with INShortcut Instance
2. The use the relevanceProviders property to assign an array of INRelevanceProvider values
3. Get the INRelevanceStore and call setRelevantShortcuts to make Siri aware of the actions that the app can perform.


References:
https://willowtreeapps.com/ideas/wwdc-how-to-implement-siri-shortcuts-for-your-app

No comments:

Post a Comment