46.16 Adding the Confirm Method
To fully conform with the BuyStockIntentHandling protocol, the IntentHandler class also needs to contain a confirm() method. As outlined in the SiriKit introductory chapter, this method is called by Siri to check that the handler is ready to handle the intent. All that is needed for this example is for the confirm() method to provide Siri with a ready status as follows:
public func confirm(intent: BuyStockIntent,
completion: @escaping (BuyStockIntentResponse) -> Void) {
completion(BuyStockIntentResponse(code: .ready, userActivity: nil))
}