Crash unter iOS9 mit - [NSPersistentStoreCoordinator_coordinator_you_never_successfully_opened_the_database_device_locked:]
Meine App hat kürzlich diese Abstürze von Crashlytics erhalten, die nur unter iOS9 auftreten.
Schwerwiegende Ausnahme: NSInternalInconsistencyException
Dieser NSPersistentStoreCoordinator hat keine persistenten Speicher (beschädigte Datei). Es kann keine Sicherungsoperation ausgeführt werden.
Der letzte Anruf aus dem Bericht ist
-[NSPersistentStoreCoordinator _coordinator_you_never_successfully_opened_the_database_device_locked:]
und so wird der NSPersistentStoreCoordinator erstellt
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator{
if (_persistentStoreCoordinator != nil) {
return _persistentStoreCoordinator;
}
AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
NSURL *storeURL = [[delegate applicationDocumentsDirectory] URLByAppendingPathComponent:@"database.sqlite"];
_persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:self.managedObjectModel];
NSError* error = nil;
if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType
configuration:nil
URL:storeURL
options:@{NSMigratePersistentStoresAutomaticallyOption:@YES, NSInferMappingModelAutomaticallyOption:@YES} error:&error])
{
NSLog(@"Error adding persistent store. %@, %@", error, error.userInfo);
return nil;
}
return _persistentStoreCoordinator;
}
Weiß jemand, was diese Abstürze verursachen könnte?