On 10 Aug 2014, at 14:33, Roland King <r...@rols.org> wrote:

> 
>> On 10 Aug 2014, at 2:18 pm, Gerriet M. Denkmann <gerr...@mdenkmann.de> wrote:
>> 
>> I have an app with an Xpc Helper, which currently starts with:
>>      NSXPCConnection( serviceName: xpcServiceName )
>> But the goal is that two apps should talk to each other, the Xpc Helper 
>> being used to exchange endpoints.
>> 
>> So I have to use:
>>      NSXPCConnection(machServiceName: xpcServiceName, options: 0)
>> For this my Xpc Helper has to live in Library/LaunchAgents.
>> 
>> Is there any Cocoa (or lower level) way to do this?
>> Or should I just use FileManager to copy the Xpc Helper?
>> 
>> In the case of a privileged Helper I once used SMJobBless(). But this Helper 
>> does need no root rights.
>> 
>> There is SMJobSubmit() which looks like it does what I need. But: 
>> "Deprecated in OS X v10.10".
>> What is the modern and future-proof replacement for this?
>> 
> Can you not make an installer which installs your app in /Applications and 
> your helper app in Library/LaunchAgents, running whatever scripts are 
> necessary? 

This is probably an excellent idea. 
But while debugging, I think just making the app copy it's helper into 
LaunchAgents is maybe more convenient.
But I will keep your suggestion in mind.

But it turns out that copying is not enough. 
And that NSWorkspace  launchAppWithBundleIdentifier:... just does what is in 
it's name: it launches apps, but refuses to touch LaunchAgents.

So: How do I launch my Xpc Helper (which by now sits happily in 
/Library/LauchAgents)?


Kind regards,

Gerriet.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to