<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ExtensionKit",
  "identifier" : "/documentation/ExtensionKit/EXHostViewController",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "ExtensionKit"
    ],
    "preciseIdentifier" : "c:objc(cs)EXHostViewController"
  },
  "title" : "EXHostViewController"
}
-->

# EXHostViewController

A view controller that hosts remote views provided by an app extension.

```
class EXHostViewController
```

## Overview

Present this view controller from your app’s interface to display the content for
an associated app extension. Configure the view controller with the app extension
identity and the specific scene you want to display. Use the associated delegate
object to receive notifications when the app extension becomes active or inactive.

For more information about presenting this view controller and using it to display
an app extension’s UI, see [Including extension-based UI in your interface](/documentation/ExtensionKit/including-extension-based-ui-in-your-interface).

## Topics

### Configuring the view controller

[`configuration`](/documentation/ExtensionKit/EXHostViewController/configuration-swift.property)

The information the host view controller uses to fetch the appropriate scene
from an app extension.

[`Configuration`](/documentation/ExtensionKit/EXHostViewController/Configuration-swift.struct)

An object that holds configuration options for a host view controller.

[`placeholderView`](/documentation/ExtensionKit/EXHostViewController/placeholderView)

The view to display when the view controller has no app extension content to display.

### Connecting to the app extension

[`makeXPCConnection()`](/documentation/ExtensionKit/EXHostViewController/makeXPCConnection())

Initiates an XPC connection to the app extension’s scene.

### Responding to activation and deactivation events

[`delegate`](/documentation/ExtensionKit/EXHostViewController/delegate)

A custom delegate object you use to receive notifications about the activation
and deactivation of the app extension.

[`EXHostViewControllerDelegate`](/documentation/ExtensionKit/EXHostViewControllerDelegate)

An interface you use to track the activation and deactivation of an app extension.

## Relationships

### Conforms To

[`NSEditor`](/documentation/AppKit/NSEditor)

[`UIActivityItemsConfigurationProviding`](/documentation/UIKit/UIActivityItemsConfigurationProviding)

[`UITraitChangeObservable-67e94`](/documentation/UIKit/UITraitChangeObservable-67e94)

[`UIAppearanceContainer`](/documentation/UIKit/UIAppearanceContainer)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`NSUserInterfaceItemIdentification`](/documentation/AppKit/NSUserInterfaceItemIdentification)

[`NSStandardKeyBindingResponding`](/documentation/AppKit/NSStandardKeyBindingResponding)

[`NSUserActivityRestoring`](/documentation/AppKit/NSUserActivityRestoring)

[`NSExtensionRequestHandling`](/documentation/Foundation/NSExtensionRequestHandling)

[`NSSeguePerforming`](/documentation/AppKit/NSSeguePerforming)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`UITraitEnvironment`](/documentation/UIKit/UITraitEnvironment)

[`UIResponderStandardEditActions`](/documentation/UIKit/UIResponderStandardEditActions)

[`Hashable`](/documentation/Swift/Hashable)

[`UIContentContainer`](/documentation/UIKit/UIContentContainer)

[`UIUserActivityRestoring`](/documentation/UIKit/UIUserActivityRestoring)

[`Equatable`](/documentation/Swift/Equatable)

[`UIStateRestoring`](/documentation/UIKit/UIStateRestoring)

[`UIPasteConfigurationSupporting`](/documentation/UIKit/UIPasteConfigurationSupporting)

[`UIFocusEnvironment`](/documentation/UIKit/UIFocusEnvironment)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSCoding`](/documentation/Foundation/NSCoding)

### Inherits From

[`UIViewController`](/documentation/UIKit/UIViewController)

[`NSViewController`](/documentation/AppKit/NSViewController)

---

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)