我有一个DB.swift
文件,以便使用Core Data。在我persistentStoreCoordinator
的{{1}}行中,我收到了我在下面写的错误。
这是我的代码的外观:
abort()
`2015-11-13 17:14:09.432 MyTestApp [17121:1577592] CoreData:错误:-addPersistentStoreWithType:SQLite配置:(null)URL:file:/// Users / sentiasa / Library / Developer / CoreSimulator / Devices / 3E42AB50-BBB1-4190-93E1-2EFF77FCA7CB / data / Containers / Data / Application / F4E05308-852A-42E0-AB5A-8712CD6FD508 / Documents / coredata.sqlite options:(null)...返回错误Error Domain = NSCocoaErrorDomain Code = 134100"(null)"的UserInfo = {元数据= { NSPersistenceFrameworkVersion = 640; NSStoreModelVersionHashes = { 用户=< 3d1a75c4 8f710e63 26eb5f88 c4fe6477 b2af77a8 6f9d5600 6abaf2bc 2c6ba1da&gt ;; }; NSStoreModelVersionHashesVersion = 3; NSStoreModelVersionIdentifiers =( "" ); NSStoreType = SQLite; NSStoreUUID =" A979CF18-B316-4989-B118-A1CE44C0AAE8&#34 ;; " _NSAutoVacuumLevel" = 2; },reason =用于打开商店的模型与用于创建商店的模型不兼容,带有userInfo字典{ metadata = { NSPersistenceFrameworkVersion = 640; NSStoreModelVersionHashes = { 用户=< 3d1a75c4 8f710e63 26eb5f88 c4fe6477 b2af77a8 6f9d5600 6abaf2bc 2c6ba1da&gt ;; }; NSStoreModelVersionHashesVersion = 3; NSStoreModelVersionIdentifiers =( "" ); NSStoreType = SQLite; NSStoreUUID =" A979CF18-B316-4989-B118-A1CE44C0AAE8&#34 ;; " _NSAutoVacuumLevel" = 2; }; reason ="用于打开商店的模型与用于创建商店的模型不兼容&#34 ;; } 2015-11-13 17:14:09.435 MyTestApp [17121:1577592]未解决的错误错误域= NSCocoaErrorDomain代码= 134100"(null)"的UserInfo = {元数据= { NSPersistenceFrameworkVersion = 640; NSStoreModelVersionHashes = { 用户=< 3d1a75c4 8f710e63 26eb5f88 c4fe6477 b2af77a8 6f9d5600 6abaf2bc 2c6ba1da&gt ;; }; NSStoreModelVersionHashesVersion = 3; NSStoreModelVersionIdentifiers =( "" ); NSStoreType = SQLite; NSStoreUUID =" A979CF18-B316-4989-B118-A1CE44C0AAE8&#34 ;; " _NSAutoVacuumLevel" = 2; },reason =用于打开商店的模型与用于创建商店的模型不兼容},[NSLocalizedDescription:无法初始化应用程序的已保存数据,NSLocalizedFailureReason:创建或加载应用程序时出错&# 39; s保存数据。,NSUnderlyingError:错误域= NSCocoaErrorDomain代码= 134100"(null)"的UserInfo = {元数据= { NSPersistenceFrameworkVersion = 640; NSStoreModelVersionHashes = { 用户=< 3d1a75c4 8f710e63 26eb5f88 c4fe6477 b2af77a8 6f9d5600 6abaf2bc 2c6ba1da&gt ;; }; NSStoreModelVersionHashesVersion = 3; NSStoreModelVersionIdentifiers =( "" ); NSStoreType = SQLite; NSStoreUUID =" A979CF18-B316-4989-B118-A1CE44C0AAE8&#34 ;; " _NSAutoVacuumLevel" = 2; },reason =用于打开商店的模型与用于创建商店的模型不兼容}] (lldb)