In SiriShortcut, if I am giving a parameter of Boolean then Siri is not asking for the bool value in the dialog. This is because it is taking default value.
Is there any way to overcome this issue?
Finally, I got the solution of above problem.
First, we need to create an Enum type with name "Save" and then add the Cases with any name you want, I give "Yes" for 1 Index and "No" for 2 Index. As you can see in the below screenshot.
Then Go to your intents and then select Type of Enum instead of Boolean.
Then select Default value as "unknown".
Then go to your IntentHandler file and then paste the below code. That can Enable Siri to ask for a value "Yes" or "No" option because by default we have selected "unknown".
func resolveSave(for intent: SaveIntent, with completion: @escaping (SaveResolutionResult) -> Void) {
let save = intent.save
switch save {
case .no, .yes:
completion(SaveResolutionResult.success(with: save))
default:
completion(SaveResolutionResult.needsValue())
return
}
}