On 4 Sep 2013, at 15:54, Fritz Anderson <anderson.fr...@gmail.com> wrote:

> On 4 Sep 2013, at 6:33 AM, Dave <d...@looktowindward.com> wrote:
> 
>> It doesn't actually say use an Core Data SQLite file, it says use a 
>> persistent store which may or may not be the same thing. Using an SQLite 
>> file that has been created using an older version of the app is really dodgy 
>> for a number of reasons:
>> 
>> You have to manually copy the data out of an app from the simulator or a 
>> device into your project structure. If you don't do this, if the Model 
>> Changes, it may well crash on a clean install. This will be largely hidden 
>> at the development stage.
>> 
>> It is better to use the same source as the real application will use to 
>> build a fresh copy of the Store. In my case the live app uses JSON Server 
>> feeds to populate a Core Data Store. So, in this case all I have to do is 
>> hold local copies of the JSON files, and on a clean install (the first time 
>> the app is launched), change the URL to point to the local files, instead of 
>> the usual Server URL.
> 
> I understand you to be saying, as an absolute best practice, that apps that 
> depend on initialized Core Data stores should generate the initial stores 
> from raw (or reformatted) source data. Forgive me if I misunderstand.

It's best practise IF it's possible to do it with your App (which I can in this 
case). If for some reason (like it's too slow) you can't do best practise, then 
do second best practise and document it!

Cheers
Dave
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to