XPC connections
Create and manage connections to services using connection-based APIs.
Overview
Use these APIs to work with XPC connections and related types — for example, when a framework function that you call returns an xpc_connection_t.
But, in most situations, the listener- and session-based APIs are a better choice for designing XPC communication protocols. For more information, see Creating XPC services.
Topics
Creation
xpc_connection_txpc_connection_create(_:_:)xpc_connection_create_from_endpoint(_:)xpc_connection_create_mach_service(_:_:_:)xpc_connection_set_target_queue(_:_:)XPC_CONNECTION_MACH_SERVICE_LISTENERXPC_CONNECTION_MACH_SERVICE_PRIVILEGED
Event handling
Life cycle
xpc_main(_:)xpc_connection_activate(_:)xpc_connection_suspend(_:)xpc_connection_resume(_:)xpc_connection_cancel(_:)xpc_transaction_begin()xpc_transaction_end()xpc_connection_copy_invalidation_reason(_:)
Messages
xpc_connection_send_message(_:_:)xpc_connection_send_barrier(_:_:)xpc_connection_send_message_with_reply(_:_:_:_:)xpc_connection_send_message_with_reply_sync(_:_:)xpc_main(_:)
Remote peer information
xpc_connection_get_name(_:)xpc_connection_get_euid(_:)xpc_connection_get_egid(_:)xpc_connection_get_pid(_:)xpc_connection_get_asid(_:)xpc_connection_set_peer_entitlement_exists_requirement(_:_:)xpc_connection_set_peer_entitlement_matches_value_requirement(_:_:_:)xpc_connection_set_peer_lightweight_code_requirement(_:_:)xpc_connection_set_peer_platform_identity_requirement(_:_:)xpc_connection_set_peer_team_identity_requirement(_:_:)xpc_connection_set_peer_code_signing_requirement(_:_:)
Context
xpc_connection_set_context(_:_:)xpc_connection_get_context(_:)xpc_connection_set_finalizer_f(_:_:)xpc_finalizer_t