---
title: "xpc_endpoint_create(_:)"
framework: xpc
role: symbol
role_heading: Function
path: "xpc/xpc_endpoint_create(_:)"
---

# xpc_endpoint_create(_:)

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

## Declaration

```swift
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

Return Value A new endpoint object.

## See Also

### Endpoints

- [xpc_endpoint_t](xpc/xpc_endpoint_t.md)
