Overriding -save: like that isn't going to work. The two immediate problems I see are: (1) In the encrypted case you don't call the original save method, so in turn -didSave doesn't get called, which does some important bookkeeping like clearing the needsSave flag. (2) There are code paths, like through +saveModels:error: and -[CBLDatabase saveAllModels], that don't call -save: but call the internal method -justSave: instead, so your code won't get called.
It'd be much better if you override -propertiesToSave: instead. Just call super, change the returned dictionary into one with the encrypted data, and return that. --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/118E4877-39E8-484C-A7C6-66A432F2B968%40mooseyard.com. For more options, visit https://groups.google.com/groups/opt_out.
