Ask Each Time on macOS doesn't not allow empty selection

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

Since the behavior you're seeing here is different between iOS and macOS, this could be a bug. Could you open a bug report with a small project containing the above code snippet and a sysdiagnose so we can take a look at it? Please post the FB number here of report so I can correlate it with this forums thread.

— Ed Ford,  DTS Engineer

Ask Each Time on macOS doesn't not allow empty selection
 
 
Q