<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ExtensionKit",
  "identifier" : "/documentation/ExtensionKit/EXHostViewControllerDelegate/hostViewControllerDidActivate(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ExtensionKit"
    ],
    "preciseIdentifier" : "c:objc(pl)EXHostViewControllerDelegate(im)hostViewControllerDidActivate:"
  },
  "title" : "hostViewControllerDidActivate(_:)"
}
-->

# hostViewControllerDidActivate(_:)

Tells the host that the app extension is active and ready to accept an XPC connection.

```
@MainActor optional func hostViewControllerDidActivate(_ viewController: EXHostViewController)
```

## Parameters

`viewController`

The host view controller that initiated the connection.

## Discussion

The host view controller calls this method after it launches an app extension and connects
to its remote scene. Use this method to establish an XPC connection to the newly created UI instance.

---

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)