XPCSession support?
Hello -
I was wondering if it was possible for this library to use the Swift-native XPCSession instead of NSXPCConnection? I'm targeting macOS 26+ and trying to avoid as much legacy code as possible.
Hello! I actually started working on exactly this. It turned out to be quite hard to do in a way that respects ExtensionKit's existing concurrency set up. But thanks for the reminder, I want to return to it.
I might be able to put something together that has a supportable API but only works for 26+ to start...
Digging through the specs, ExtensionKit has no support for XPCSession even on 26. It would require a reimplementation of ExtensionKit.
Although there might be a way to abstract away the entirety of ExtensionKit into a new set of APIs where it works with XPCSession and converts back and forth between XPCSession and NSXPCConnection.
However, I did submit a PR with the basics to update the parts of library on ExtensionFoundation.
I was looking into this API here. What problems did you run into?
https://developer.apple.com/documentation/extensionfoundation/connectionhandler/init(onsessionrequest:)
I was looking into this API here. What problems did you run into?
The problem is not with any of the ExtensionFoundation side, it's all of ExtensionKit - the methods don't have XPCSession compatible versions.
Ok, I think I've pinned it down to the fact that PrimitiveAppExtensionScene doesn't have support for XPCSession.
(sorry for the delay here)
Riiight, yes. A very strange and unfortunate omission...