<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/IntentsUI/INUIHostedViewControlling/configure(with:context:completion:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "IntentsUI"
    ],
    "preciseIdentifier" : "c:objc(pl)INUIHostedViewControlling(im)configureWithInteraction:context:completion:"
  },
  "title" : "configure(with:context:completion:)"
}
-->

# configure(with:context:completion:)

Configures your view controller’s content.

```
optional func configure(with interaction: INInteraction, context: INUIHostedViewContext, completion: @escaping (CGSize) -> Void)
```

## Parameters

`interaction`

The interaction object containing the intent and response objects. Use the information in this object to configure the content of your view controller’s view. For some types of interactions, only an intent object is available.

`context`

The context in which your view controller is displayed. Use this parameter to determine whether your view controller is to be displayed in the Maps or Siri interface. You can customize your view controller accordingly for each interface.

`completion`

The block to execute when you finish configuring your view controller. You must execute this block at some point in your implementation of this method. This block has no return value and takes the following parameter:

- desiredSize: The size you want applied to the view controller’s view. Specify a value that is between the allowed minimum and maximum size, which you can get from the view controller’s associated <doc://com.apple.documentation/documentation/Foundation/NSExtensionContext> object. Specify <doc://com.apple.documentation/documentation/CoreGraphics/CGRectZero> to hide your view controller’s content altogether.

## Discussion

Before displaying your view controller, Siri and Maps call this method so that you can configure the contents of your view controller’s view. Use the `interaction` and `context` parameters to configure the view. When you are done, execute the provided `completion` block and specify the size for the view. The size you specify must be between the values in the <doc://com.apple.documentation/documentation/Foundation/NSExtensionContext/hostedViewMinimumAllowedSize> and <doc://com.apple.documentation/documentation/Foundation/NSExtensionContext/hostedViewMaximumAllowedSize> properties of the view controller’s <doc://com.apple.documentation/documentation/Foundation/NSExtensionContext> object. Siri tries to use the size you provide but may adjust it to fit the available space.

After your view controller is onscreen, Maps may call this method additional times to deliver updated information. Each time the method is called, use the new data to update your interface. Execute the `completion` block when you are finished.

If you implement the [`configureView(for:of:interactiveBehavior:context:completion:)`](/documentation/IntentsUI/INUIHostedViewControlling/configureView(for:of:interactiveBehavior:context:completion:)) method in your view controller, SiriKit does not call this method.

---

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)