Thanks
On May 23, 2017, at 7:57 AM, parvez....@decurtis.com wrote:For an iOS application backed by Couchbase Lite though we do have KVO support on CBLLiveQuery that helps us observe changes to the documents in database.
If I delete the document D1 from server then at iOS end, how we will be notified of this delete action? How we come to know that D1 is deleted?
for change in notification.userInfo?["changes"] as! Array<CBLDatabaseChange> {
if(!change.isCurrentRevision) {
continue;
}
// FETCH THE DOCUMENT THAT HAS CHANGED
let changedDoc = database.existingDocument(withID: change.documentID);
if(changedDoc == nil) {
// THIS WOULD TELL YOU THAT A DOCUMENT IS DELETED
return;
On May 26, 2017, at 8:26 AM, Priya R <priya.r...@couchbase.com> wrote:// FETCH THE DOCUMENT THAT HAS CHANGED
let changedDoc = database.existingDocument(withID: change.documentID);
if(changedDoc == nil) {
// THIS WOULD TELL YOU THAT A DOCUMENT IS DELETED
return;