Donating shortcuts with INinteractions

Donating shortcuts with user activities is pretty straightforward and powerful. The only downside is that your app has to be launched to handle shortcuts when the user executes them. Sometimes this might be the behavior you need, but for the case of booking an ap

To achieve this, you need to implement a custom intent, and an extension that can handle it. Let's set up the custom intent and prepare the app for donating and potentially handling the intent. After doing this, you will see how to implement an Intents extension that handles your custom intent.

The first step to implement your own custom intent is to create an intent definition file. Add a new file to your project and choose the SiriKit Intent ...

Get Mastering iOS 12 Programming - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.