简体   繁体   English

使用加密的CoreData实现时是否需要shm和wal文件?

[英]Are shm and wal files needed when using an Encrypted CoreData implementation?

I'm using an encrypted CoreData framework that was recommend. 我正在使用推荐的加密CoreData框架

I noticed that the shm and wal files are missing from the documents directory. 我注意到文档目录中缺少shm和wal文件。 I did some research and it seems like they are temporary files that the SQLite data base uses. 我做了一些研究,看来它们是SQLite数据库使用的临时文件。

Are they removed for security reasons or did I do something wrong ? 是出于安全原因将它们删除还是我做错了什么?

Here is my persistent store coordinator from my CoreData Stack. 这是我来自CoreData Stack的持久性存储协调器。

private lazy var psc: NSPersistentStoreCoordinator = {
    let coordinator = EncryptedStore.makeStore(self.managedObjectModel, passcode: "1Gd3-dflv19902-dfj")
    return coordinator
}()

The shm and wal files are created and used only for some journaled modes of operation for the SQLite store, so it depends entirely on how the store is configured as to wether that are created. shm和wal文件是为SQLite存储创建的,仅用于某些日志操作模式,因此,这完全取决于存储的配置方式以及创建的方式。 If they are created you can't just delete them as they are required and you'll corrupt the data store by doing so. 如果创建了它们,则不能仅删除它们,而是这样做会破坏数据存储。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM