CoreData: rm database without migrating

20 Views Asked by At

I have a CoreData sqlite database that is completely screwed on user's devices in production.

I would like to destroyPersistentStore in case if the db can't be migrated, but the funny thing is that this call under the hood seems to use sqlite truncation and requires the database to be well migrated by the time of calling it. So it doesn't work for me.

Deleting sqlite file from the file system is the tried and tested solution, but this question is not about solving this problem by any means necessary.

Is there an API in CoreData to nuke the database without requiring it to be even valid?

0

There are 0 best solutions below