Re: Mac OS X - Inter-Application Communications
Re: Mac OS X - Inter-Application Communications
- Subject: Re: Mac OS X - Inter-Application Communications
- From: Kevin Meaney <email@hidden>
- Date: Thu, 05 Mar 2015 21:48:04 +0000
On 5 Mar 2015, at 19:29, Dave <email@hidden> wrote:
>
> Hi,
>
> I’m really confused as it what type of a Application I need to create, from reading the "Daemons and Services Programming Guide", it lists:
>
> Login Item.
> XPC Service.
> Launch Daemon.
> Lauch Agent.
>
> On the face of it, a LogIn Item seems to be what i am looking for, but its unclear (at least to me) if I can host an XPC service inside this type of application?
I think you might need to provide some more info about your architecture and I also think you need to ask your questions in the xpc devforums list: https://devforums.apple.com/community/mac/coreos/xpc <https://devforums.apple.com/community/mac/coreos/xpc> because if you get an answer there it is more likely to be well informed.
I am a little confused by your terminology. I’d call an Application a process that a user interacts with (that displays the menu bar) but I wouldn’t call the four items listed above Applications.
The four items you listed above can all communicate using the XPC interprocess communication protocol but I doubt you’ll be able to install an XPC service within any of them and work with that as well.
>
> I noticed in XCode 6, you can create an XPC Service Application, so I created one, compiled it and placed the Application file in Startup Items, it seems to load up ok, at least I get a terminal window opened pointing to the App’s bundle.
>
> I am not intending on Sandboxing this.
I’m fairly certain that the XPC Service requires the Application that contains it has to be sandboxed. I would recommend for confirmation that you follow this up on the devforums list linked to above.
>
>> I think as long as the OP is not intending to sandbox then using a LaunchAgent or LoginItem for communicating with a XPC will work but I doubt that using an XPC service will do this.
>
> I’m not sure what you mean by this?
OP is Original Poster which is you, and later on in that sentence I confused things. Let me rephrase:
I think as long as Dave is not intending to sandbox his Application then using a LaunchAgent or LoginItem for communicating via XPC will work but I doubt that an XPC service will do this.
I struggled badly with this about 20 months ago. The documentation is either directed at people writing XPC services in sandboxed applications or written for unix developers used to writing daemons and describes how to achieve similar goals on OSX using language unix developers would understand, whereas writing LaunchAgents or LoginItems fit somewhere between the two. Persistence does win out. I wish I could be more certain in my replies but 20 months is long enough for certain details to be forgotten.
Kevin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden