---
title: DynamicOptionsProvider
framework: appintents
role: symbol
role_heading: Protocol
path: appintents/dynamicoptionsprovider
---

# DynamicOptionsProvider

An interface for providing a dynamic list of options for a parameter of your app intent.

## Declaration

```swift
protocol DynamicOptionsProvider : _SupportsAppDependencies
```

## Mentioned in

Adding parameters to an app intent

## Overview

Overview Implement this protocol in a type that provides a set of possible values for an intent parameter. When configuring the parameter, specify your custom type as the options provider for that parameter. The type of result you return determines how the system displays the information. Return an array of DisplayRepresentable types to display a list of values. Return an array of IntentItem types to divide values into sections or configure other presentation options. The following example shows the configuration of a custom parameter that contains the author name of a book. The options provider offers two possible suggestions for the author name. For brevity, it omits the rest of the implementation. struct CreateBook: AppIntent {     @Parameter(title: "Author Name",                optionsProvider: AuthorNamesOptionsProvider())     var authorName: String

// Other properties and the perform() implementation.

private struct AuthorNamesOptionsProvider: DynamicOptionsProvider {         func results() async throws -> [String] {             ["Juan Chavez", "Anne Johnson"]         }     } }

## Topics

### Returning the parameter options

- [results()](appintents/dynamicoptionsprovider/results().md)
- [defaultResult()](appintents/dynamicoptionsprovider/defaultresult().md)
- [Result](appintents/dynamicoptionsprovider/result.md)

### Associated Types

- [DefaultValue](appintents/dynamicoptionsprovider/defaultvalue.md)

### Type Aliases

- [DynamicOptionsProvider.Item](appintents/dynamicoptionsprovider/item.md)
- [DynamicOptionsProvider.ItemCollection](appintents/dynamicoptionsprovider/itemcollection.md)
- [DynamicOptionsProvider.ItemSection](appintents/dynamicoptionsprovider/itemsection.md)
- [DynamicOptionsProvider.ParameterDependency](appintents/dynamicoptionsprovider/parameterdependency.md)

## Relationships

### Inherited By

- [EntityPropertyQuery](appintents/entitypropertyquery.md)
- [EntityQuery](appintents/entityquery.md)
- [EntityStringQuery](appintents/entitystringquery.md)
- [EnumerableEntityQuery](appintents/enumerableentityquery.md)
- [IndexedEntityQuery](appintents/indexedentityquery.md)
- [UniqueAppEntityQuery](appintents/uniqueappentityquery.md)

### Conforming Types

- [UniqueAppEntityProvider](appintents/uniqueappentityprovider.md)

## See Also

### Parameters

- [Adding parameters to an app intent](appintents/adding-parameters-to-an-app-intent.md)
- [IntentParameter](appintents/intentparameter.md)
- [IntentParameterDependency](appintents/intentparameterdependency.md)
- [IntentParameterContext](appintents/intentparametercontext.md)
- [InputConnectionBehavior](appintents/inputconnectionbehavior.md)
- [Resolvers](appintents/resolvers.md)
