<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: 16.0.0 - 17.0.0",
    "macOS: 13.0.0 - 14.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "XPC",
  "identifier" : "/documentation/XPC/xpc_session_create_mach_service(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "s:3XPC31xpc_session_create_mach_serviceySo03OS_B7_object_pSgSPys4Int8VG_So0G15_dispatch_queueCSgAA0b1_c1_D8_flags_tVSAyADGSgtF"
  },
  "title" : "xpc_session_create_mach_service(_:_:_:_:)"
}
-->

# xpc_session_create_mach_service(_:_:_:_:)

```
func xpc_session_create_mach_service(_ mach_service: UnsafePointer<CChar>, _ target_queue: dispatch_queue_t?, _ flags: xpc_session_create_flags_t, _ error_out: AutoreleasingUnsafeMutablePointer<xpc_rich_error_t?>?) -> (any OS_xpc_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)