You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Foundation class ``NSXPCInterface`` requires an Objective-C
5
+
protocol to define the API of the interface. Those protocols
6
+
cannot be defined in Python using :class:`objc.formal_protocol`
7
+
because the Cocoa class requires some data ("extended method sigantures")
8
+
that cannot be registered using the public API for the Objectie-C
9
+
runtime.
10
+
11
+
If you do try to use a protocol defined in Python with ``NSXPCInterface``
12
+
you'll get an error similar to this:
13
+
14
+
::
15
+
NSInvalidArgumentException - NSXPCInterface: Unable to get extended method signature from Protocol data (MyProtocol / runCommand:withReply:). Use of clang is required for NSXPCInterface.
16
+
17
+
18
+
This means that any custom protocols that will be used
19
+
with ``NSXPCInterface`` need to be defined in a C extension which
20
+
is compiled using the clang compiler (the compiler used by Xcode).
21
+
22
+
The compiler will elide protocol information from the binary for
23
+
all protocols that aren't actually used. To ensure that the protocol
24
+
information is included add an (unused) function that appears to
0 commit comments