XPC provides Swift wrappers over libxpc for inter-process communication built on XPC objects. You establish connections between processes with XPCSession and accept incoming ones with XPCListener, then exchange structured data using value types such as XPCArray, XPCDictionary, and XPCLiteralValue. Received traffic arrives as an XPCReceivedMessage, while XPCEndpoint, XPCPeerRequirement, and XPCRichError support addressing peers, expressing requirements, and reporting failures across the connection.
Connections and Listeners 4
Establish outgoing connections to peers and accept incoming ones across processes.
- ClXPCSessioniOS 17.0+A `XPCSession` is a replacement for `xpc_connection_t` and provides similar
- ClXPCListeneriOS 17.0+A `XPCListener` is the server-side equivalent to an `XPCSession` and
- ClOS_xpc_session@define XPC_TYPE_SESSION
- ClOS_xpc_listener@typedef xpc_listener_t
Message Values 4
Structured value types used to compose and read the contents of XPC messages.
- StXPCArrayiOS 16.0+A value type that holds an ordered collection of values within an XPC message.
- StXPCDictionaryiOS 16.0+A value type that holds a keyed collection of values within an XPC message.
- StXPCLiteralValueiOS 27.0+A type that bridges Swift literal values to XPC objects for use in dictionary literals.
- PrOS_xpc_objectA protocol adopted by the reference-counted object types that make up the XPC runtime.
Receiving Messages 1
Inspect and respond to traffic that arrives over a connection.
- StXPCReceivedMessageiOS 17.0+A `XPCReceivedMessage` is a replacement for `XPCDictionary` for Codable messages.
Addressing and Security 2
Reference remote peers and express the requirements they must satisfy.
- StXPCEndpointA connection in serialized form.
- StXPCPeerRequirementA value that expresses the criteria a connecting peer must satisfy.
Configuration and Errors 2
Configure session creation and report failures encountered on a connection.
- Stxpc_session_create_flags_tConstants that configure the behavior of a newly created XPC session.
- StXPCRichErroriOS 17.0+A `XPCRichError` is a replacement for `XPC_ERROR_*` objects that
Protocols 1
- PrXPCPeerHandleriOS 17.0+Protocol for communicating with a peer `XPCSession`
Type Aliases 20
- Tyxpc_type_t@typedef xpc_type_t
- Tyxpc_object_t
- Tyxpc_handler_t
- Tyxpc_connection_t
- Tyxpc_connection_handler_t@typedef xpc_connection_handler_t
- Tyxpc_endpoint_t
- Tyxpc_rich_error_t
- Tyxpc_activity_t@typedef xpc_activity_t
- Tyxpc_activity_handler_t@typedef xpc_activity_handler_t
- Tyxpc_activity_state_t
- Tyxpc_peer_requirement_t@typedef xpc_peer_requirement_t
- Tyxpc_finalizer_t@typedef xpc_finalizer_f
- Tyxpc_session_t@define XPC_TYPE_SESSION
- Tyxpc_listener_t@typedef xpc_listener_t
- Tyxpc_listener_incoming_session_handler_t
- Tyxpc_array_applier_t
Show 4 more
- Tyxpc_dictionary_applier_t
- Tyxpc_session_cancel_handler_t
- Tyxpc_session_incoming_message_handler_t
- Tyxpc_session_reply_handler_t