I am also having this issue with a custom intent. My Intent handler is called StartMeetingIntent and you can call it either with no value or with one value. But the next messages says the following:
Code Block INCExtensionManagerFetchMatchingSiriExtensionForIntent_block_invoke_2 Failed to find extension Error Domain=INExtensionMatchingErrorDomain Code=3001 "(null)" UserInfo={ExtensionPointName=com.apple.intents-service} |
|
error 21:29:18.173171-0400 Shortcuts -[WFAction runWithInput:userInterface:parameterInputProvider:variableSource:completionHandler:]_block_invoke Action <WFHandleCustomIntentAction: 0x7f81cec74fc0, identifier: com.company.appname.StartMeetingIntent, parameters: 2> '' |
And here's my code to handle the intent
Code Block import Intents |
import SwiftUI |
import os |
|
class StartMeetingIntentHandler: NSObject, StartMeetingIntentHandling { |
|
let logger=Logger(subsystem: "com.company.appname", category: "Start Meeting Intent") |
var people: [INObject]? |
|
func handle(intent: StartMeetingIntent, completion: @escaping (StartMeetingIntentResponse) -> Void) { |
if let attendees = intent.people { |
completion(StartMeetingIntentResponse.success(result: attendees)) |
} else { |
logger.log("failure") |
} |
} |
|
|
func resolvePeople(for intent: StartMeetingIntent, with completion: @escaping (StartMeetingPeopleResolutionResult) -> Void) { |
let people = Int(truncating: intent.people ?? 0) |
if people < 0 { |
completion(StartMeetingPeopleResolutionResult.unsupported(forReason: StartMeetingPeopleUnsupportedReason.negativeNumbersNotSupported)) |
} else if people > 1000 { |
completion(StartMeetingPeopleResolutionResult.unsupported(forReason: StartMeetingPeopleUnsupportedReason.greaterThanMaximumValue)) |
} else { |
completion(StartMeetingPeopleResolutionResult.success(with: people)) |
} |
} |
} |
|
And the IntentHandler is -
Code Block class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessagesIntentHandling { |
|
let logger=Logger(subsystem: "com.company.appname", category: "Intent Handler") |
|
override func handler(for intent: INIntent) -> Any { |
logger.log("\(intent)") |
|
switch intent { |
case is StartMeetingIntent: |
return StartMeetingIntentHandler() |
default: |
fatalError("No handler for this intent") |
} |
} |
} |
Any pointers would be gratefully appreciated.