• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Shared CoreData DataModel and DB file..
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shared CoreData DataModel and DB file..


  • Subject: Re: Shared CoreData DataModel and DB file..
  • From: Steve Steinitz <email@hidden>
  • Date: Tue, 29 Dec 2009 10:16:24 +1100

Hi Bob,

On 28/12/09, Robert Monaghan <email@hidden> wrote:

Is it possible to share a DataModel and resulting db file between 2 apps?
If so, what sort of pitfalls are present?

I want to create an App that creates the DB file, and a plugin for another App, that reads the database file.

I have 5 machines sharing the same database and DataModel. I alpha test by running two instances of the same app on a single machine. SQLite handles both cases without issue.


Keep in mind that Core Data implements a cache, reading from the database as little as possible. When one app changes data, your other app won't know about it until it forces a database refresh with the appropriate stalenessInterval.

Also note that a fetch doesn't refresh related objects, although it will fetch new related objects.

Regarding the earlier replies about locking, I actually do get (useful) optimistic locking errors if the machines disagree when they save. Maybe that's something else?

Ben Trumbull has vast knowledge of the inner workings of database refresh. You'll benefit if he notices your post.

Cheers,

Steve

_______________________________________________

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


  • Prev by Date: Re: Customizing left expression title in NSPredicateEditorRowTemplate
  • Next by Date: Re: Updating tracking areas Rect
  • Previous by thread: Re: Shared CoreData DataModel and DB file..
  • Next by thread: NSPredicate mal behaviour?
  • Index(es):
    • Date
    • Thread