Re: [Pyobjc-dev] Python talking to XPC services?
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2018-12-30 10:51:20
|
> On 30 Dec 2018, at 07:19, Glyph <gl...@tw...> wrote: > > I've long been curious about if and how one could use XPC services with Python, and I recently ran across this question: > > https://stackoverflow.com/questions/52284089/is-it-possible-to-use-pyobjc-with-a-privilved-xpc-helper-tool-and-xpcinterface-a <https://stackoverflow.com/questions/52284089/is-it-possible-to-use-pyobjc-with-a-privilved-xpc-helper-tool-and-xpcinterface-a> > > If anyone on this list happens to have the relevant understanding, I put a 100-point bounty on it. > > Happy holidays, I hadn’t seen this question yet, mostly because I rarely visit stackoverflow. A quick summary of my answer: 1) It is possible to call APIs with blocks, even if those APIs aren’t in Apple’s frameworks 2) It is possible to define ObjC protocols in Python 3) Those protocols don’t work with NSXPCInterface yet (issue #256), but there is an (untested) workaround I wonder how hard it will be to fix #256, with some luck NSXPCInterface access information that isn’t exposed through a public API. In particular, the NSXPCInterface error mentions “extended method signature” and I haven’t found any reference to those yet in Apple documentation. Ronald — Twitter: @ronaldoussoren Blog: https://blog.ronaldoussoren.net/ <https://blog.ronaldoussoren.net/> |