---
title: makeXPCConnection()
framework: extensionkit
role: symbol
role_heading: Instance Method
path: extensionkit/exhostviewcontroller/makexpcconnection()
---

# makeXPCConnection()

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

## Declaration

```swift
func makeXPCConnection() throws -> NSXPCConnection
```

## Mentioned in

Including extension-based UI in your interface

## Discussion

Discussion Call this method from the hostViewControllerDidActivate(_:) method to initiate a scene-specific connection to the app extension.
