https://developer.apple.com/documentation/bundleresources/information-property-list/xpcservice/joinexistingsession
JoinExistingSession | Apple Developer Documentation
There's never been a better time to develop for Apple platforms.
apple developerdocumentation