AudioServerPlugIn_MachServices
AudioServerPlugIn_MachServices
- Subject: AudioServerPlugIn_MachServices
- From: Dominic Feira <email@hidden>
- Date: Thu, 05 Jun 2014 13:52:03 -0400
I am attempting to get my plugin to communicate via xpc to a launchd agent. The listening side is working properly. I am able to connect and send messages to it from a test app. However, I am not able to connect to it from my plugin even though the code is identical
I am getting this message indicating that the AudioServerPlugIn_MachServices plist entry is correct.
com.apple.audio.DriverHelper[487]: The plug-in named MyDriver.driver requires extending the sandbox for the mach service named com.my.machservice
When I attempt to connect via xpc from the plugin I am getting a "Connection Invalid" error.
I have been referring to this technote. It just says that you need to add the AudioServerPlugIn_MachServices array with mach service names. The implication being that there isn't anything out of the ordinary that must be done in order to communicate with the service from the plugin.
https://developer.apple.com/library/mac/qa/qa1811/_index.html
Is there anything special that must be done other than adding AudioServerPlugIn_MachServices to the plugin's plist? What user should the launch daemon be running as?
Here is the client code from the plugin that isn't working. Just to be clear this code works fine from a test app. It just doesn't work from the plugin.
xpc_connection_t connection = xpc_connection_create_mach_service("com.my.machservice", NULL, 0);
if(connection){
syslog(LOG_NOTICE, "got a connection");
xpc_connection_set_event_handler(connection, ^(xpc_object_t event) {
syslog(LOG_NOTICE, "client event handler");
if(event){
char* eventDesc = xpc_copy_description(event);
if(eventDesc){
syslog(LOG_NOTICE, "event: %s", eventDesc);
}
}
});
xpc_connection_resume(connection);
}
-- Dominic Feira
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden