<!--
{
  "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/makeXPCConnection()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ExtensionFoundation"
    ],
    "preciseIdentifier" : "s:19ExtensionFoundation03AppA7ProcessV17makeXPCConnectionSo15NSXPCConnectionCyKF"
  },
  "title" : "makeXPCConnection()"
}
-->

# makeXPCConnection()

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

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

## Return Value

The connection 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
types of the Foundation framework. 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)