<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.1.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ExtensionFoundation",
  "identifier" : "/documentation/ExtensionFoundation/AppExtensionConfiguration",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "ExtensionFoundation"
    ],
    "preciseIdentifier" : "s:19ExtensionFoundation03AppA13ConfigurationP"
  },
  "title" : "AppExtensionConfiguration"
}
-->

# AppExtensionConfiguration

An interface you use to configure the XPC connection in your app extension.

```
@MainActor @preconcurrency protocol AppExtensionConfiguration : Sendable
```

## Overview

Adopt this protocol in a custom type, and use that type to finalize the XPC connection to the
host app. The host app tries to create an XPC connection to your app extension shortly after
launching it. The system directs that connection request to the code in your configuration
object. Use your code to provide the host with the information it needs to communicate with
your app extension.

This protocol supports app extensions that don’t offer any custom UI. If your app extension
provides custom UI, instead use the  <doc://com.apple.documentation/documentation/ExtensionKit/AppExtensionSceneConfiguration>
type from <doc://com.apple.documentation/documentation/ExtensionKit>.

## Topics

### Accepting a connection to the host app

[`func accept(connection: NSXPCConnection) -> Bool`](/documentation/ExtensionFoundation/AppExtensionConfiguration/accept(connection:))

Returns a Boolean value that indicates whether you accept an incoming connection
request from the host app.

## Relationships

### Inherits From

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

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

### Conforming Types

[`ConnectionHandler`](/documentation/ExtensionFoundation/ConnectionHandler)

---

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)