<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Optional/makeContainer(context:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:Sq21AppIntentsTypeSupportAA22IntentValueConvertibleRzlE13makeContainer7contextAA0efI0VAF17ConversionContextV_tF"
  },
  "title" : "makeContainer(context:)"
}
-->

# makeContainer(context:)

Creates a container that represents this optional intent value.

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

## Parameters

`context`

The context to use for the conversion.

## Return Value

An intent value container representing this optional value.

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)