This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)resetPersistentStore | |
{ | |
NSURL *storeURL = [NSURL fileURLWithPath:[[NSString documentsPath] stringByAppendingPathComponent:DatabaseFileName]]; | |
// Remove persistent store from the coordinator | |
NSPersistentStore *store = [_persistentStoreCoordinator persistentStoreForURL:storeURL]; | |
NSError *error = nil; | |
if (![_persistentStoreCoordinator removePersistentStore:store error:&error]) | |
{ | |
// handle error |