Re: Coredata - populating initial data on app load - best practices
Re: Coredata - populating initial data on app load - best practices
- Subject: Re: Coredata - populating initial data on app load - best practices
- From: "Jason Kravitz" <email@hidden>
- Date: Mon, 3 Mar 2008 17:31:39 +0100
Cheers, I thought I'd read through the CoreData programming guide but
must have missed this FAQ at the end.
So given the 3 options in this article, any guidelines for when one is
more beneficial than another?
* You can create the managed objects directly in code (as
trivially illustrated in NSPersistentDocument Core Data Tutorial).
* You can create a property list—or some other file-based
representation—of the data, and store it as an application resource.
When you want to use it, you must open the file and parse the
representation to create managed objects.
* You can create a separate persistent store that contains the
default data. When you want to use it, you must copy the objects from
the defaults store to the newly-created store.
In my case it is a small dataset but I'd be curious what people
recommend for various use cases.
On Mon, Mar 3, 2008 at 5:18 PM, mmalc crawford <email@hidden> wrote:
>
> On Mar 3, 2008, at 7:48 AM, Jason Kravitz wrote:
>
> > I am writing my first coredata application and am wondering what the
> > recommended way is to populate initial data. Most coredata examples do
> > a good job explaining binding and getting data from the UI but fail to
> > refer to populating the initial data set.
>
> <http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdFAQ.html#//apple_ref/doc/uid/TP40001802-SW5
> >
>
> mmalc
>
>
_______________________________________________
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