• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Applying iOS file protection to SQLite databases
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Applying iOS file protection to SQLite databases


  • Subject: Applying iOS file protection to SQLite databases
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 15 Aug 2012 16:16:51 -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 two side files (with "-shm" and "-wal" suffixes) 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

PS: I posted this yesterday (in slightly different form) but it never showed up for me; apologies if this is a dup.
_______________________________________________

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


  • Follow-Ups:
    • Re: Applying iOS file protection to SQLite databases
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Trying to find workarounds for serious memory leak in IKImageView
  • Next by Date: Re: Trying to find workarounds for serious memory leak in IKImageView
  • Previous by thread: Applying iOS file protection to SQLite databases
  • Next by thread: Re: Applying iOS file protection to SQLite databases
  • Index(es):
    • Date
    • Thread