swalkner
swalkner

Reputation: 17349

SQLCipher, encrypted-core-data and iOS - are two .sqlite-files normal?

I'm using SQLCipher to encrypt my database as there's sensitive information. Everything seems to work, I'm just irritated because I've got two .sqlite-files right now:

~/Library/Application Support/MyData.sqlite
~/Library/Application Support/MyApp/MyData.sqlite
~/Library/Application Support/MyApp/MyData.sqlite-shm
~/Library/Application Support/MyApp/MyData.sqlite-wal

The first one is encrypted, the second isn't - but it doesn't contain any information. So it seems to work as there's no way to get to the information, but I just wanted to ensure that this is correct.

Upvotes: 0

Views: 938

Answers (1)

casademora
casademora

Reputation: 69687

You'll need to turn off the Write Ahead Logging feature of sqlite. To do this in Core Data, you need to set a pragma option on your store. You can see how to set the flag from this related stackoverflow question

Upvotes: -1

Related Questions