mentrena / SyncKit

Automatic CloudKit synchronization
https://mentrena.github.io/SyncKit/
MIT License
507 stars 59 forks source link

CoreDataStack.deleteStore() leaves "temporary" sqlite files #117

Closed BlixLT closed 4 years ago

BlixLT commented 4 years ago

deleteStore() deletes only actual sqlite file, but there are so called temporary files being left. Apparently they are not so temporary and at least in my case store-shm, store-wal files remains in store's folder. Not sure if it is because of them, but sometimes after recreating store I experience weird behavior/crash. The most recent crash happened because of an error opening sqlite database, smth like "database integrity compromised by api violation vnode unlinked". Anyway, not sure if these files caused this crash, but in any case, it would be better if these files also were deleted from the store folder. What do you think?

mentrena commented 4 years ago

Hmm I'll just use NSPersistentStoreCoordinator.destroyPersistentStore, I think that should take care of those.