---
title: "accept(connection:)"
framework: extensionkit
role: symbol
role_heading: Instance Method
path: "extensionkit/appextensionsceneconfiguration/accept(connection:)"
---

# accept(connection:)

A closure the framework calls when a host tries to connect to this extension.

## Declaration

```swift
nonisolated func accept(connection: NSXPCConnection) -> Bool
```

## Return Value

Return Value A Boolean value that indicates whether the extension accepts the connection.

## Discussion

Discussion connection: The incoming XPC connection object.
