While not using XPC, The code in the following repo - https://github.com/johnboiles/obs-mac-virtualcam demonstrates how to communicate between a DAL plugin and a user space application. The code uses Foundation's distributed objects - https://developer.apple.com/documentation/foundation/object_runtime/distributed_objects_support?language=objc and it is very straightforward and easy to understand.
Edit: Oh, I missed the part which says that distributed objects is deprecated :(
Topic:
App & System Services
SubTopic:
Processes & Concurrency
Tags: