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

# AppExtensionProcess

A type the host app creates to launch and manage an app extension.

```
struct AppExtensionProcess
```

## Overview

Create this type from your host app when you want to communicate with an available app
extension. This type creates a new process, and runs the app extension’s startup code in
that process. After startup, establish an XPC connection to the app extension’s process
using the methods of this type. Use that XPC connection to communicate with the app extension.

When creating an instance of this type, you specify which app extension to launch using an
[`AppExtensionIdentity`](/documentation/ExtensionFoundation/AppExtensionIdentity) type. If the app extension is already running, creating the
`AppExtensionProcess` type configures it with the already running process. If the app
extension isn’t yet running, creating this type forks a new process and runs the app
extension’s startup code in it. In both cases, you receive an instance of this structure
only after the app extension is running and ready for you to establish an XPC connection.

Maintain a reference to this structure for as long as you need to communicate with the app
extension. When you no longer need the app extension, call the `invalidate` method to release
your app’s reference to the process. If the app extension process exits for any reason, the
system calls the [`onInterruption`](/documentation/ExtensionFoundation/AppExtensionProcess/Configuration/onInterruption) handler you provided
at configuration time.

## Topics

### Creating the app-extension process

[`init(configuration:)`](/documentation/ExtensionFoundation/AppExtensionProcess/init(configuration:)-2g0cy)

Finds an existing process for the specified app extension or creates a new one synchronously.

[`init(configuration:)`](/documentation/ExtensionFoundation/AppExtensionProcess/init(configuration:)-38zf)

Finds an existing process for the specified app extension or creates a new one asynchronously.

[`Configuration`](/documentation/ExtensionFoundation/AppExtensionProcess/Configuration)

A structure that holds the identity of an app extension and process-related details.

### Connecting to the app extension

[`makeXPCConnection()`](/documentation/ExtensionFoundation/AppExtensionProcess/makeXPCConnection())

Connect to the app extension process using the XPC types of the Foundation framework.

[`makeXPCSession()`](/documentation/ExtensionFoundation/AppExtensionProcess/makeXPCSession())

Connect to the app extension process using an XPC session.

### Invalidating the app-extension connection

[`invalidate()`](/documentation/ExtensionFoundation/AppExtensionProcess/invalidate())

Invalidates the host app’s connection to the app extension process.



---

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)