Applying iOS file protection to SQLite databases
Applying iOS file protection to SQLite databases
- Subject: Applying iOS file protection to SQLite databases
- From: Jens Alfke <email@hidden>
- Date: Tue, 14 Aug 2012 14:10:50 -0700
How can I enable full file protection (encryption) on iOS for SQLite databases?
The obvious, easy part is setting the NSFileProtectionComplete attribute on the SQLite database file after it's first created. Presumably this attribute will stick, because I don't think SQLite every recreates the file from scratch, it just updates it incrementally.
The problem is the side files created by SQLite. By default there is a "journal" file that exists temporarily during transactions, and if one enables the write-ahead log (WAL) feature, which really improves write performance, there are about three side files that seem to exist permanently, which contain recently-added rows before they get merged into the main database file. How do I ensure that those files get the appropriate protection attributes too?
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden