I'm using the following code to to consolidate my Core Data sqlite store files, which current consists of the database itself, a -wal and a -shm file. I am doing this so I can manipulate it as a single file using NSFileManager.
NSPersistentStoreCoordinator *tmpPSC = [[NSPersistentStoreCoordinator alloc]
initWithManagedObjectModel...];
NSDictionary *options = @{NSSQLitePragmasOption:
@{@"journal_mode": @"DELETE"}};
NSPersistentStore *persistentStore = [tmpPSC
addPersistentStoreWithType:NSSQLiteStoreType configuration:nil
URL:storeURL options:options error:NULL];
if (persistentStore) {
[tmpPSC removePersistentStore:persistentStore error:NULL];
tmpPSC = nil;
}
However, after the above code execute, I am seeing the -wal file disappear, but the -shm file is still there.
Any idea why this is so?