Siri intents crashing when resolving with needsValue

So I'm working on a logging app that uses Siri to log diaper changes for babies. There are 3 types of diaper changes, wet, dirty, both. I created a enum for these values in the intent definition file and made it configurable and resolvable.

in the resolve function, I added this line of code

public func resolveDiaperType(for intent: DiaperIntentIntent, with completion: @escaping (DiaperTypeResolutionResult) -> Void) {
        let needsValue = intent.diaperType == .unknown
        if needsValue {
            completion(.needsValue())
        } else {
            completion(.success(with: intent.diaperType))
        }
    }

But as soon as .needsValue() is called, the UI will ask user to select one value, and then crash the app.

I tried removing a lot of different params and code blocks, needsValue is the only thing that's crashing for me. If I make the default diaperType parameter as .dirty instead of .unknown, it works.

Basically it won't let me work with an empty enum parameter.

I get the SIGABRT error and the app crashes.

I have like 4 intents. 3 of them uses enums. All 3 crash on the enum input UI. all 3 work correctly when the enum is given a value instead of .unknown.

The problem is, I NEED to ask user the type. If I give it a default value and resolve it with .needsValue(), it still crashes.

I cannot ask the user for a value.

I haver made siri intents with enums input before. And those intents STILL WORK. They were just made for older Xcode versions

Is this an Xcode bug? Testing on iOS 17.2 simulator Xcode 15.2

Siri intents crashing when resolving with needsValue
 
 
Q