Я хотел бы проверить, присутствует ли старый sqlite в приложении и не соответствует новой модели.Например, если я добавил несколько таблиц в модель coredata, я бы хотел избежать сбоя, если база данных sqlite приложения не совпадает.
Цель состоит в том, чтобы удалить базу данных и позволить coredata создать другую базу данных.с хорошей моделью.
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'This NSPersistentStoreCoordinator has no persistent stores (schema mismatch or migration failure). It cannot perform a save operation.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010daed1e6 __exceptionPreprocess + 294
1 libobjc.A.dylib 0x000000010c6c1031 objc_exception_throw + 48
2 CoreData 0x000000010d5cc6c3 -[NSPersistentStoreCoordinator _coordinator_you_never_successfully_opened_the_database_schema_mismatch:] + 51
3 CoreData 0x000000010d5ccd55 -[NSPersistentStoreCoordinator _introspectLastErrorAndThrow] + 165
4 CoreData 0x000000010d5cd101 __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke + 593
5 CoreData 0x000000010d5c57a8 -[NSPersistentStoreCoordinator _routeHeavyweightBlock:] + 360
6 CoreData 0x000000010d4cbc02 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 642
7 CoreData 0x000000010d4cbc2b -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 683
8 CoreData 0x000000010d4f469b -[NSManagedObjectContext save:] + 1579
9 Formbox_Webbox 0x000000010b853aaf -[DB_ListOfValue_manage removeLinesInTable:] + 1055
10 Formbox_Webbox 0x000000010b850add -[DB_ListOfValue_manage removeAllDB] + 2125
11 Formbox_Webbox 0x000000010b79d99d -[ViewController sync:] + 141
12 Formbox_Webbox 0x000000010b7a0080 __35-[ViewController checkFirstSynchro]_block_invoke + 128
13 Formbox_Webbox 0x000000010b83da0a __63+[Reachability checkInternetConnectivityWithSuccessCompletion:]_block_invoke + 346
14 CFNetwork 0x0000000113178f4f __67+[NSURLConnection sendAsynchronousRequest:queue:completionHandler:]_block_invoke_2 + 161
15 Foundation 0x000000010c0d7363 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
16 Foundation 0x000000010c0d71ca -[NSBlockOperation main] + 68
17 Foundation 0x000000010c0d56b2 -[__NSOperationInternal _start:] + 766
18 libdispatch.dylib 0x00000001128dc7ec _dispatch_client_callout + 8
19 libdispatch.dylib 0x00000001128e1db8 _dispatch_block_invoke_direct + 592
20 libdispatch.dylib 0x00000001128dc7ec _dispatch_client_callout + 8
21 libdispatch.dylib 0x00000001128e1db8 _dispatch_block_invoke_direct + 592
22 libdispatch.dylib 0x00000001128e1b48 dispatch_block_perform + 109
23 Foundation 0x000000010c0d175b __NSOQSchedule_f + 337
24 libdispatch.dylib 0x00000001128dc7ec _dispatch_client_callout + 8
25 libdispatch.dylib 0x00000001128e2ad9 _dispatch_continuation_pop + 967
26 libdispatch.dylib 0x00000001128e0f54 _dispatch_async_redirect_invoke + 780
27 libdispatch.dylib 0x00000001128e836c _dispatch_root_queue_drain + 664
28 libdispatch.dylib 0x00000001128e8076 _dispatch_worker_thread3 + 132
29 libsystem_pthread.dylib 0x0000000112dc4169 _pthread_wqthread + 1387
30 libsystem_pthread.dylib 0x0000000112dc3be9 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Заранее спасибо.