macOS 14 XPC vs Foundation XPC

I'm looking into a newer XPC API available starting with macOS 14. Although it's declared as a low-level API I can't figure it how to specify code signing requirement using XPCListener and XPCSession. How do I connect it with xpc_listener_set_peer_code_signing_requirement and xpc_connection_set_peer_code_signing_requirement which require xpc_listener_t and xpc_connection_t respectively?

Foundation XPC is declared as a high-level API and provides easy ways to specify code signing requirements on both ends of xpc.

I'm confused with all these XPC APIs and their future:

  1. Newer really high-level XPCListener and XPCSession API (in low-level framework???)

  2. Low-level xpc_listener_t & xpc_connection_t -like API. Is it being replaced by newer XPCListener and XPCSession?

  3. How is it related to High-level Foundation XPC? Are NSXPCListener and NSXPCConnection going to be deprecated and replaced by XPCListener and XPCSession??

macOS 14 XPC vs Foundation XPC
 
 
Q