Post

Replies

Boosts

Views

Activity

Shared XPC service
Hello, I want to build a developer tool and I have the following setup in mind. The tool consists of a macOS app with a GUI a background service (XPC service?) that performs the "heavy lifting" and a framework ("Client.framework") that can be used by the developer to build customisations based on the background service. These customisations are supposed to be run as a command line tool, in the swift REPL or as a Playground. Both the macOS GUI app and the Client.framework are kind of clients of the background service. I did some experiments with an XPC service hosted by the macos app. During these experiements I was not able to connect to the XPC from the Client.framework (tried in the swift REPL, as a command line tool and a Playground). As soon as I try to open the connection to the XPC, the connection's invalidationHandler is called. Accesing the XPC from within the macOS GUI app ("host" app) works fine. How can I implement this setup? Is an XPC service the right choice for my background service? Do I need to configure the XPC in a specific way to make it accessible from a framework used in the swift REPL, a command line tool or an Xcode Playground? Thanks! steven
4
1
1k
Mar ’22