我正在使用 Magical Record 来保存我的数据。这些数据需要加密,所以我试图将它与 SQLCipher 库(http://sqlcipher.net/ios-tutorial/)结合起来。
我已经设置了 SQLCipher 并使用 Core Data 成功测试了它,使用此示例中的 EncryptedStore 文件https://github.com/project-imas/encrypted-core-data:
我所做的只是像这样更改 NSPersistentStoreCoordinator :
NSPersistentStoreCoordinator *coordinator = [EncryptedStore makeStore:[self managedObjectModel]:[SSKeychain passwordForService:myservice account:myaccount]];
所以我认为我需要更改在 MagicalRecord 中创建 NSPersistentStoreCoordinator 的方式,但我没有运气,所以任何帮助将不胜感激。