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: Tue, 03 Mar 2015 22:34:49 +0000
On 3 Mar 2015, at 16:56, Kyle Sluder <email@hidden> wrote:
>
> On Tue, Mar 3, 2015, at 05:50 AM, Dave wrote:
>> I have the high level flow worked out now, but I’m not sure of what to
>> use in order to Send Events between my Applications and whether I need to
>> have one App (e.g. the Background App or another dedicated
>> “DatabaseManager” Background App) solely responsible for accessing the
>> database so as to ensure it’s in sync and that updates are run in the
>> correct order.
>>
>> I was thinking of using IPC/XPC as a means of doing this and I’m reading
>> “Daemons and Services Programming Guide”.
>>
>> Any advice or suggestions as to best way of achieving this would be
>> greatly appreciated.
>
> The modern way to do this would be to have an XPC service exclusively
> own the database, and have all other applications talk to the XPC
> service to request data.
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. You might just be able to make it work using XPC services for example if you have one all encompassing sandboxed App which contains multiple XPC services that do different tasks.
You might find the WWDC session 308 from 2012 useful.
I’ve an example project on github for a launch agent that uses XPC. I’m sorry I haven’t updated since implementing in Xcode 5. https://github.com/SheffieldKevin/LaunchAgent
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