---
title: XPC_CONNECTION_MACH_SERVICE_PRIVILEGED
framework: xpc
role: symbol
role_heading: Global Variable
path: xpc/xpc_connection_mach_service_privileged
---

# XPC_CONNECTION_MACH_SERVICE_PRIVILEGED

A flag that indicates the job advertising the service name belongs to a launch daemon rather than a launch agent.

## Declaration

```swift
var XPC_CONNECTION_MACH_SERVICE_PRIVILEGED: Int32 { get }
```

## Discussion

Discussion Pass this to xpc_connection_create_mach_service(_:_:_:). This flag indicates that the job advertising the service name in its launchd.plist needs to be in the privileged Mach bootstrap. Do this by placing your launchd.plist in /Library/LaunchDaemons. If you specify this alongside the XPC_CONNECTION_MACH_SERVICE_LISTENER flag, this flag is a no-op.

## See Also

### Creation

- [xpc_connection_t](xpc/xpc_connection_t.md)
- [xpc_connection_create(_:_:)](xpc/xpc_connection_create(_:_:).md)
- [xpc_connection_create_from_endpoint(_:)](xpc/xpc_connection_create_from_endpoint(_:).md)
- [xpc_connection_create_mach_service(_:_:_:)](xpc/xpc_connection_create_mach_service(_:_:_:).md)
- [xpc_connection_set_target_queue(_:_:)](xpc/xpc_connection_set_target_queue(_:_:).md)
- [XPC_CONNECTION_MACH_SERVICE_LISTENER](xpc/xpc_connection_mach_service_listener.md)
