Re: Removing Core Data from an existing app
Re: Removing Core Data from an existing app
- Subject: Re: Removing Core Data from an existing app
- From: Jerry Krinock <email@hidden>
- Date: Fri, 14 Mar 2014 19:05:51 -0700
On 2014 Mar 14, at 11:18, Bradley O'Hearne <email@hidden> wrote:
> about dealing with crashing … rather than deal with the data completely in bulk, I think incremental migration and deletion of entities from Core Data would be the best idea. That way if there’s an interruption or crash, any app launch can pick up right where it left off.
No, I think you missed the point of that. Although efficiency may be an issue to reduce peak memory usage in iOS, it’s more about fail-safeness.
• Don’t delete the old Core Data store from the disk, or any data in it, until your new store is complete and verified, or maybe be even more extreme, like Apple does in Core Data migrations in Mac apps, *never* delete the old store. To be safe, make a copy the file. Append a tilde to the filename. If you want, maybe delete it five app launches later, or however long it might take trouble to appear to the user.
• When attempting to open a migrated file, your app should be able to detect if the migrated file is incomplete, and if so start over from scratch and migrate from the old store. A crash or power failure during migration, which could cause such an incomplete store, should be a very rare event.
_______________________________________________
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