删除XMPPFramework会导致CoreData崩溃

时间:2015-07-30 19:00:15

标签: ios core-data xmppframework

我从项目中删除了XMPPFramework,因为我不再需要它。但是,由于CoreData迁移问题,我的应用程序现在崩溃了。 XMPPFramework添加的所有核心数据实体现在都已从我的数据模型中消失(显然),但Core Data无法从此数据模型更改和崩溃中恢复。如何迁移我的数据模型以包含我的数据模型中缺少所有这些表的事实?

实施例:         NSStoreModelVersionHashes = {

        Message = <a4ab6db8 >;

        EXAMPLE1 = <6ac82d7d >;

        EXAMPLE2 = <7dcb3fdc >;

        EXAMPLE3 = <57b68932 >;

        EXAMPLE4 = <64ea72d1 >;

        Service = <5bfb096d >;

        XMPPCapsCoreDataStorageObject = <fcc8a450 >;

        XMPPCapsResourceCoreDataStorageObject = <b4ad78f7 >;

        XMPPGroupCoreDataStorageObject = <2d9d5e0b >;

        "XMPPMessageArchiving_Contact_CoreDataObject" = <b35921c6 >;

        "XMPPMessageArchiving_Message_CoreDataObject" = <55ad74f0 >;

        XMPPResourceCoreDataStorageObject = <e31f4b20 >;

        XMPPRoomMessageCoreDataStorageObject = <e93f6bf3 >;

        XMPPRoomMessageHybridCoreDataStorageObject = <13824bff >;

        XMPPRoomOccupantCoreDataStorageObject = <2848335c >;

        XMPPUserCoreDataStorageObject = <0ef429b0 >;

        XMPPvCardAvatarCoreDataStorageObject = <66d4bf5e >;

        XMPPvCardCoreDataStorageObject = <adac5b15 >;

        XMPPvCardTempCoreDataStorageObject = <8a708229 >;

    };

NSPersistentStoreCoordinator的当前模型哈希是{

        EXAMPLE1 = <6ac82d7d >;

        EXAMPLE2 = <7dcb3fdc >;

        EXAMPLE3 = <57b68932 >;

        EXAMPLE4 = <64ea72d1 >;

}

正如您所看到的,所有与XMPP相关的托管对象都已消失,轻量级迁移失败。我需要帮助进行自定义迁移到新数据模型。请帮忙!

-Sunny

1 个答案:

答案 0 :(得分:0)

最有可能当您删除框架时,您丢失了部分Core Data模型(尽管我不熟悉该框架)。假设错误是迁移失败,您需要恢复旧数据模型并创建没有这些表的新数据模型,以便Core Data可以找到其轻量级迁移的源和目标模型。如果没有这两种模型,Core Data就无法进行迁移。