Re: Two Applications Sharing Same Core Data Database
Re: Two Applications Sharing Same Core Data Database
- Subject: Re: Two Applications Sharing Same Core Data Database
- From: "Carter R. Harrison" <email@hidden>
- Date: Wed, 30 Mar 2011 16:05:31 -0400
On Mar 30, 2011, at 4:03 PM, Nick Zitzmann wrote:
>
> On Mar 30, 2011, at 1:45 PM, Carter R. Harrison wrote:
>
>> I'm working on a Mac Application that will have a helper application that is always running in the background (even if the main application is not currently running). Currently the main application uses Core Data to manage persistent objects. I'd like to setup the helper application to be able to use the same persistent store. I've read through the Core Data documentation, specifically the section on concurrency, but I feel as though my situation is different from what is discussed in that document and I'm still a little confused as to what the best approach is.
>>
>> So my questions are:
>> 1. Is it even possible to do this?
>
> Yes, as long as they're on the same computer.
Yes they will be on the same computer.
>
>> 2. What is the best way to implement it?
>
> Put your CoreData code into a framework shared by your applications. And use distributed notifications to keep the applications in sync.
So when one application saves the data store, then it sends a distributed notification to tell the other application to reload its object graph?
>
> Nick Zitzmann
> <http://www.chronosnet.com/>
>
_______________________________________________
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