Hello! I'm facing a strange behavior on macOS related to Ask Each Time, which works fine on iOS. I've an App Intent that declares a parameter like so:
@Parameter(
title: "Tags",
description: "Tags to add to the link.",
optionsProvider: TagsOptionsProvider()
)
var tags: [String]?
The TagsOptionProvider
is like this:
struct TagsOptionsProvider: DynamicOptionsProvider {
@Dependency
private var modelCoordinator: ModelCoordinator
@MainActor
func results() async throws -> [String] {
return modelCoordinator.tags().compactMap { $0.name }
}
}
Now, the issue comes if I create a shortcut where for the tags
parameter the user selects the magic variable Ask Each Time
. On iOS, when the user is presented with the selector, they can simply tap 'Done' without selecting any value (the user does not want to include any tag). The problem is that on macOS the 'Done' button is disabled if there's no selection. See both behaviors:
iOS:
macOS:
Question:
Is there a way to let macOS continue even if the user doesn't select any of the available options like on iOS? I've tried declaring the tags
para meter as Optional (like on the screenshot) and non-optional, both cases show the same behavior.
Environment:
- iOS 18.5
- macOS 15.5