仅在IOS 8中的核心数据迁移问题,而不是IOS 9

仅在IOS 8中的核心数据迁移问题,而不是IOS 9,第1张

概述我面临核心数据迁移的奇怪的 IOS应用程序问题.以下是您提到的日志此问题仅在IOS8设备将应用程序从较低版本迁移到较新版本时发生.注意我已使用模型版本光数据迁移升级在IOS9中传递此测试. 任何快速帮助都非常受欢迎,因为它的生产. CoreData: error: -addPersistentStoreWithType:SQLite configuration:(null) URL:file:// 我面临核心数据迁移的奇怪的 IOS应用程序问题.以下是您提到的日志此问题仅在IOS8设备将应用程序从较低版本迁移到较新版本时发生.注意我已使用模型版本光数据迁移升级在IOS9中传递此测试.

任何快速帮助都非常受欢迎,因为它的生产.

CoreData: error: -addPersistentStoreWithType:sqlite configuration:(null) URL:file:///xxxxx/documents/Application.sqlite options:{    NSInferMapPingModelautomaticallyOption = 1;    NSMigratePersistentStoresautomaticallyOption = 1;} ... returned error Error Domain=NSCocoaErrorDomain Code=134130 "The operation Couldn’t be completed. (Cocoa error 134130.)" UserInfo=0x171a7ca80 {URL=file:///xxxxx/documents/Application.sqlite,Metadata={    NSPersistenceFrameworkVersion = 519;    NsstoreModelVersionHashes =     {        Chattable = <a131aa9a f7588fa9 598a8949 05511a36 d0bf9ea9 33c0a87e 96828261 f5de30d4>;        Operationtable = <6a3eaabc 7ef604c6 deb9314a 309bf207 378ff20a 4be5546a 6b602826 f0d049db>;        Contact = <db1bb713 c747ff41 d73a018c a5208828 8dcd87e8 d4d8afd8 c37f055b 3d7f7f5a>;        Email = <35cfbcd3 d990c32c 2bd3b793 a55a6e06 5f88a3a8 d67f77e7 d4a63c17 a512cf73>;        table3 = <373be7dc e2ab077d f0503f49 6a9f8b78 0b5392d9 c5fc2309 e4035d2b 6fd49388>;        table4 = <42c77ddb da95c75b 22186c01 5407888f 41c92961 47ec4d22 e8183b35 3d002893>;        RCtable1 = <c9dc1b34 b49b1c2b 291f32a6 f5297396 21152a09 c12cd735 15caf6bb e5aade3b>;        table2 = <cd2d5199 058890f8 0dd7381f dfae070b ffab95e8 8ca28838 cb6f6127 7bde6f3c>;        User = <88f315d2 6b34a4f4 4ce1b4ed ee2cf303 94c9a7bc 3efe7d71 7e84744b 1203d13a>;    };    NsstoreModelVersionHashesversion = 3;    NsstoreModelVersionIDentifIErs =     (        ""    );    NsstoreType = sqlite;    NsstoreUUID = "cdaB1111-D8D9-4021-B8B5-C8B823FBFD3F";    "_NSautoVacuumLevel" = 2;},reason=Can't find model for source store} with userInfo dictionary {    URL = "file:///xxxx/documents/Application.sqlite";    Metadata =     {        NSPersistenceFrameworkVersion = 519;        NsstoreModelVersionHashes =         {            Chattable = <a131aa9a f7588fa9 598a8949 05511a36 d0bf9ea9 33c0a87e 96828261 f5de30d4>;            Operationtable = <6a3eaabc 7ef604c6 deb9314a 309bf207 378ff20a 4be5546a 6b602826 f0d049db>;            Contact = <db1bb713 c747ff41 d73a018c a5208828 8dcd87e8 d4d8afd8 c37f055b 3d7f7f5a>;            Email = <35cfbcd3 d990c32c 2bd3b793 a55a6e06 5f88a3a8 d67f77e7 d4a63c17 a512cf73>;            table3 = <373be7dc e2ab077d f0503f49 6a9f8b78 0b5392d9 c5fc2309 e4035d2b 6fd49388>;            table4 = <42c77ddb da95c75b 22186c01 5407888f 41c92961 47ec4d22 e8183b35 3d002893>;            RCtable1 = <c9dc1b34 b49b1c2b 291f32a6 f5297396 21152a09 c12cd735 15caf6bb e5aade3b>;            table2 = <cd2d5199 058890f8 0dd7381f dfae070b ffab95e8 8ca28838 cb6f6127 7bde6f3c>;            User = <88f315d2 6b34a4f4 4ce1b4ed ee2cf303 94c9a7bc 3efe7d71 7e84744b 1203d13a>;        };        NsstoreModelVersionHashesversion = 3;        NsstoreModelVersionIDentifIErs =         (            ""        );        NsstoreType = sqlite;        NsstoreUUID = "cdaB1111-D8D9-4021-B8B5-C8B823FBFD3F";        "_NSautoVacuumLevel" = 2;    };    reason = "Can't find model for source store";}2015-12-30 13:55:11.279 Closrr_LV4[8639:2062615] CoreData: annotation: NSPersistentStoreCoordinator's current model hashes are {    Chattable = <53f22878 98260327 12c33f30 8d3ef551 a1d7f284 079eb744 212a896f e13d6398>;    Operationtable = <92a573a7 a131a638 754226be 515cd608 84d6f04a f58b8e28 6e477951 4d2a143d>;    ChatPushConfig = <d0ecca3f 05d67a77 7a909f4f f9bae449 f6338c17 1a70991f 11cabaf3 efbb15d6>;    Contact = <1d6da19b 5bb3ca73 480e4235 9aedb38d 4dbd80d1 402f0f00 715504b4 4a165454>;    table3 = <072e4c37 22cc6fcd d77c8e66 235df69a f8478d4e 9e76894c e0bffbf6 448bf321>;    GMtable = <5cd15514 954477e9 439521cc c48044de 6e15c3f7 dfb6289e 260f8c26 4182cf78>;    table4 = <a949a462 e11e300c 1be32e1f 9106c5e5 a2d16ce1 93b8ed68 8c9fe18f fff9886e>;    RCtable1 = <f526cbca 492a30ab 9af60b86 fd7d103f e9bfed46 1aa3daad ae9ea90f 37cb3cc6>;    table2 = <3e371807 557217db 22e78097 0055a51c bcec2200 4a1ced2e 79c8e612 63220389>;    User = <dbe32c0d 95fc9df5 bf457c67 906be0c5 f659e106 d52497ac eb3da3f3 b1e1fcbc>;}
解决方法 在iOS版本8及更低版本中,您需要在项目中显式创建新版本的架构,以便iOS可以比较应用程序包中的两个架构并执行轻量级迁移.

在iOS 9中,Core Data存储将当前架构与(sqlite)数据文件一起存储,这样,如果/当您更改应用程序包中的架构时,它可以在磁盘上捕获的架构和应用包中的新架构.

这是一个快速的谷歌搜索结果,为您指出正确的方向… http://www.informit.com/articles/article.aspx?p=2150667&seqNum=2

总结

以上是内存溢出为你收集整理的仅在IOS 8中的核心数据迁移问题,而不是IOS 9全部内容,希望文章能够帮你解决仅在IOS 8中的核心数据迁移问题,而不是IOS 9所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1048225.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-25
下一篇 2022-05-25

发表评论

登录后才能评论

评论列表(0条)

保存