<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ExtensionFoundation",
  "identifier" : "/documentation/ExtensionFoundation/AppExtensionProcess/makeXPCSession()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ExtensionFoundation"
    ],
    "preciseIdentifier" : "s:19ExtensionFoundation03AppA7ProcessV14makeXPCSession3XPC0F0CyKF"
  },
  "title" : "makeXPCSession()"
}
-->

# makeXPCSession()

Connect to the app extension process using an XPC session.

```
func makeXPCSession() throws -> XPCSession
```

## Return Value

The session object your app uses to communicate with the app extension.

## Discussion

Call this method to create a connection between your host app and an app extension using the
XPC framework. You might choose this approach to connect a more secure connection to an app
extension running in a sandboxed process. If the app extension accepts the connection request,
the returned connection object contains the proxy information you need to communicate with it.
If the app extension refuses the request or doesn’t support this connection type, this method
throws an error.

---

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)