iOS Magical Record & SQLCipher

三世轮回 提交于 2019-12-03 14:23:54

If you already have a persistent store coordinator, you will have to setup the core data stack manually when using MagicalRecord. I recommend something along these lines:

 NSPersistentStoreCoordinator *coordinator = //how ever you do it;
 [NSPersistentStoreCoordinator MR_setDefaultCoordinator:coordinator];
 [NSManagedObjectContext MR_initializeDefaultContextWithCoordinator:coordinator];

You may need to expose the initialize method on your own.

As a side note, you may want to add a ticket to the MagicalRecord issues log to add a method to the setup method collection to specify your own coordinator so that this work is taken care of by MagicalRecord itself.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!