0

I have created an Intents Extension (Siri). How can I create my own resolve method?

Example resolve method:

func resolvePickupLocation(for intent: INRequestRideIntent, with completion: @escaping (INPlacemarkResolutionResult) -> Void) { .. }

I want create something like this:

func resolveSubcontractor(for intent: INRequestRideIntent, with completion: @escaping (INPlacemarkResolutionResult) -> Void) { .. }
Andrei Lupu
  • 154
  • 1
  • 7

1 Answers1

1

You cannot. The system calls the built-in SiriKit methods of your Intents Extension, there's no way to modify the function names or function signatures.

From iOS12, Siri Shortcuts provide much more flexibility. For an example project on using Siri Shortcuts, see the Sirikit - Accelerating app interactions with Shortcuts sample project from Apple.

Dávid Pásztor
  • 51,403
  • 9
  • 85
  • 116
  • I don't want to modify an existent method, I want to create another one (custom). But I understand what do you say and I think you are right .. I don't think I can create another method which siri doesn't know about it. I know about Siri Shortcuts from iOS 12, but I want a solution for iOS 10 and later. Thank you for your response. – Andrei Lupu Jun 13 '18 at 15:46
  • There's no solution for iOS10, you can only use the built-in SiriKit extensions and their provided methods. – Dávid Pásztor Jun 13 '18 at 15:48