<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "XPC",
  "identifier" : "/documentation/XPC/xpc_endpoint_create(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "c:@F@xpc_endpoint_create"
  },
  "title" : "xpc_endpoint_create(_:)"
}
-->

# xpc_endpoint_create(_:)

Creates a new endpoint from a connection that is suitable for embedding into messages.

```
func xpc_endpoint_create(_ connection: xpc_connection_t) -> xpc_endpoint_t
```

## Parameters

`connection`

Only connections obtained through calls to one of the `xpc_connection_create` functions may be given to this API. Passing any other type of connection is not supported and will result in undefined behavior.

## Return Value

A new endpoint object.

---

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)