<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "XPC",
  "identifier" : "/documentation/XPC/xpc_connection_handler_t",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "c:@T@xpc_connection_handler_t"
  },
  "title" : "xpc_connection_handler_t"
}
-->

# xpc_connection_handler_t

The type of the function to invoke for a bundled XPC service when there’s a new connection on the service.

```
typealias xpc_connection_handler_t = (xpc_connection_t) -> Void
```

## Parameters

`connection`

A new connection that is equivalent to one received by a listener connection. See the documentation for [`xpc_connection_set_event_handler(_:_:)`](/documentation/XPC/xpc_connection_set_event_handler(_:_:)) for the semantics associated with the received connection.

---

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)