Hello,
I have implemented an Endpoint Security system extension with the NSEndpointSecurityMachServiceName property.
My app is able to connect to the extension using initWithMachServiceName and is able to run the functions exported by the extension.
But the reverse produces a strange error in the app process:
<NSXPCConnection: 0x12f924aa0> connection to service on pid 30174 named a.b.c.d.e.f: Exception caught during decoding of received selector hello, dropping incoming message.
Exception: <NSXPCDecoder: 0x10b909600> received a message or reply block that is not in the interface of the remote object (hello), dropping.
(
0 CoreFoundation 0x00007fff205f56af __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff2032d3c9 objc_exception_throw + 48
2 Foundation 0x00007fff212c73e4 -[NSXPCDecoder __decodeXPCObject:allowingSimpleMessageSend:outInvocation:outArguments:outArgumentsMaxCount:outMethodSignature:outSelector:isReply:replySelector:interface:] + 2244
3 Foundation 0x00007fff21312001 -[NSXPCDecoder _decodeMessageFromXPCObject:allowingSimpleMessageSend:outInvocation:outArguments:outArgumentsMaxCount:outMethodSignature:outSelector:interface:] + 33
4 Foundation 0x00007fff21310e3b -[NSXPCConnection _decodeAndInvokeMessageWithEvent:flags:] + 418
5 Foundation 0x00007fff212c8d49 message_handler + 206
6 libxpc.dylib 0x00007fff201c6c28 _xpc_connection_call_event_handler + 56
7 libxpc.dylib 0x00007fff201c5a9c _xpc_connection_mach_event + 935
8 libdispatch.dylib 0x00007fff202d8867 _dispatch_client_callout4 + 9
9 libdispatch.dylib 0x00007fff202efa47 _dispatch_mach_msg_invoke + 441
10 libdispatch.dylib 0x00007fff202de4a7 _dispatch_lane_serial_drain + 263
11 libdispatch.dylib 0x00007fff202f05b8 _dispatch_mach_invoke + 498
12 libdispatch.dylib 0x00007fff202de4a7 _dispatch_lane_serial_drain + 263
13 libdispatch.dylib 0x00007fff202df0fe _dispatch_lane_invoke + 426
14 libdispatch.dylib 0x00007fff202e8c5d _dispatch_workloop_worker_thread + 819
15 libsystem_pthread.dylib 0x00007fff20480499 _pthread_wqthread + 314
16 libsystem_pthread.dylib 0x00007fff2047f467 start_wqthread + 15
)
The "hello" function called from the extension is logically in the interface of the local object (the app). Why should it be in the interface of the remote object (the extension)?
hello is a very simple function:
Thank you.
Chris
I have implemented an Endpoint Security system extension with the NSEndpointSecurityMachServiceName property.
My app is able to connect to the extension using initWithMachServiceName and is able to run the functions exported by the extension.
But the reverse produces a strange error in the app process:
<NSXPCConnection: 0x12f924aa0> connection to service on pid 30174 named a.b.c.d.e.f: Exception caught during decoding of received selector hello, dropping incoming message.
Exception: <NSXPCDecoder: 0x10b909600> received a message or reply block that is not in the interface of the remote object (hello), dropping.
(
0 CoreFoundation 0x00007fff205f56af __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff2032d3c9 objc_exception_throw + 48
2 Foundation 0x00007fff212c73e4 -[NSXPCDecoder __decodeXPCObject:allowingSimpleMessageSend:outInvocation:outArguments:outArgumentsMaxCount:outMethodSignature:outSelector:isReply:replySelector:interface:] + 2244
3 Foundation 0x00007fff21312001 -[NSXPCDecoder _decodeMessageFromXPCObject:allowingSimpleMessageSend:outInvocation:outArguments:outArgumentsMaxCount:outMethodSignature:outSelector:interface:] + 33
4 Foundation 0x00007fff21310e3b -[NSXPCConnection _decodeAndInvokeMessageWithEvent:flags:] + 418
5 Foundation 0x00007fff212c8d49 message_handler + 206
6 libxpc.dylib 0x00007fff201c6c28 _xpc_connection_call_event_handler + 56
7 libxpc.dylib 0x00007fff201c5a9c _xpc_connection_mach_event + 935
8 libdispatch.dylib 0x00007fff202d8867 _dispatch_client_callout4 + 9
9 libdispatch.dylib 0x00007fff202efa47 _dispatch_mach_msg_invoke + 441
10 libdispatch.dylib 0x00007fff202de4a7 _dispatch_lane_serial_drain + 263
11 libdispatch.dylib 0x00007fff202f05b8 _dispatch_mach_invoke + 498
12 libdispatch.dylib 0x00007fff202de4a7 _dispatch_lane_serial_drain + 263
13 libdispatch.dylib 0x00007fff202df0fe _dispatch_lane_invoke + 426
14 libdispatch.dylib 0x00007fff202e8c5d _dispatch_workloop_worker_thread + 819
15 libsystem_pthread.dylib 0x00007fff20480499 _pthread_wqthread + 314
16 libsystem_pthread.dylib 0x00007fff2047f467 start_wqthread + 15
)
The "hello" function called from the extension is logically in the interface of the local object (the app). Why should it be in the interface of the remote object (the extension)?
hello is a very simple function:
(void)hello;
Thank you.
Chris