After a bid of digging, it seems it is simply not possible to do this: you cannot simply setup a XPC service and expects another app, even under same app group, to communicate with it. That it work in Xcode is just a side effect of Xcode debugging.
It'll be helpful to know why XPC is not applicable in this context, but as suggested in this post XPC and App-to-App Communication the proper way is 1) not use XPC, 2) "XPC Rendezvous" using a third launchd job that only purpose is relay XPC listener endpoint.
Topic:
App & System Services
SubTopic:
Processes & Concurrency
Tags: