Use o arquivo CoreData pré-carregado

– (NSPersistentStoreCoordinator *)persistentStoreCoordinator{ if (_persistentStoreCoordinator != nil) { return _persistentStoreCoordinator; } NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@”newCoreDataFile.sqlite”]; NSError *error = nil; if (![[NSFileManager defaultManager] fileExistsAtPath:[[[self applicationDocumentsDirectory] path] stringByAppendingPathComponent: @”newCoreDataFile.sqlite”]]){ //database …

Continuar lendo