Performing the desired action

Once Siri understands what the user wants to do and which parameters to use, and once your app has confirmed that everything is in place to handle the user's request, the time has finally come to execute the requested action. Once this time has come, Siri calls the handle method on your intent handler.

Just like the confirm method, every intent has their own version of this method, but they all follow a similar pattern. For sending messages, the method signature is handle(intent:completion:), where the intent is an instance of INSendMessageIntent. The parameters for this method are identical to the ones in the confirmation step. The major difference is that you're now expected to handle the intent, instead of ...

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.