On Mar 2, 2014, at 3:18 PM, Nate <[email protected]> wrote:
> 1. I saw an older commit to TouchDB where you added support for the data
> protection APIs. I still see some references to this in the current
> codebase, but I'd like to confirm that Couchbase Lite is still encrypting
> local data where available.
All files on iOS are encrypted; there are just different levels of security of
the keys. The Apple white paper I posted a link to a few days ago goes into a
lot of detail; if you're interested in file security it's a must-read.
In CBLDatabase+Internal.m:
int flags = SQLITE_OPEN_FILEPROTECTION_COMPLETEUNLESSOPEN;
and CBLBlobStore has several places it applies the
NSDataWritingFileProtectionCompleteUnlessOpen attribute to attachment files.
> 2. This seems like an easy way to process documents on sync even if they
> aren't being transformed. As an example, I need to check documents for
> changes after a pull replication and update data outside of CBL if the
> documents have been modified.
Hm, that's really not the intention of this API, and I wouldn't use it for any
operation with external side effects because it's called by the puller before
the documents are added to the database, so there's a chance they might not get
added.
> Is there a better way to handle this with CBL (something like the changes
> feed)?
There's no native access to the changes feed, but you can create a view that
emits the document's sequence number as the key, and use that similarly. The
sequence number is available to a map function as the "_local_seq" property of
the document dictionary.
--Jens
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/CA960226-DD4F-4F46-B764-BF65F57A3399%40couchbase.com.
For more options, visit https://groups.google.com/groups/opt_out.