44.9 Modifying the IntentHandler Implementation
The IntentHandler class now needs to be updated to add support for Siri photo search intents. Edit the IntentHandler.swift file and change the class declaration so it reads as follows:
import Intents
import Photos
class IntentHandler: INExtension, INSearchForPhotosIntentHandling {
override func handler(for intent: INIntent) -> Any {
return self
}
}
The only method currently implemented within the IntentHandler.swift file is the handler method. This method is the entry point into the extension and is called by SiriKit when the user indicates that the SiriPhoto app is to be used to perform a task. When calling this method, SiriKit expects in return a reference to the object responsible for handling the intent. Since this will be the responsibility...