---
title: "makeContainer(context:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/optional/makecontainer(context:)"
---

# makeContainer(context:)

Creates a container that represents this optional intent value.

## Declaration

```swift
func makeContainer(context: IntentValueContainer.ConversionContext) -> IntentValueContainer
```

## Parameters

- `context`: The context to use for the conversion.

## Return Value

Return Value An intent value container representing this optional value.

## Discussion

Discussion If the optional is nil, it creates a container that resolves to a null vlaue. If the optional isn’t nil, it delegates the conversation to the wrapped value’s container creation.
