Fill the blank
Fill the blank to finish the intent.
import AppIntents
struct StartFocusTimer: AppIntent {
static let title: LocalizedStringResource = "Start Focus Timer"
@Parameter(title: "Minutes") var minutes: Int
func perform() async throws -> some IntentResult {
await TimerStore.shared.start(minutes: minutes)
return ____
}
}Hint 1 of 1
IntentResult has a static factory.
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A .result()
Correct. It returns an IntentResult with no extra value or dialog.
Why not the others?
- B
.success. There is no .success on IntentResult. - C
nil. perform must return a result. - D
Void(). Void isn't an IntentResult.