Friday, May 29, 2020 [Tweets] [Favorites]

Backing Up Core Data Stores

Tom Harrington:

Once you use this method, the persistent store you migrated is removed from the persistent store coordinator. It also adds the newly-migrated store to the coordinator. So now the store is using the new copy instead of the old one. That’s not good for a backup, since the new copy is the backup you just made that you want to leave alone. It’s also a potential app crasher, since any managed objects you already fetched came from a persistent store that’s no longer available.

He recommends using a second, temporary persistent store coordinator as the source for the migration.

Comments

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment