Q: about getPendingDocumentIDs to fetch all document sync complete

#1

HI,

I have been looking for how to judge the complete end of synchronization. I find getPendingDocumentIDs, but it seems work only on cblite 1.4. now I using cblite 2.1,how can I check the client all data sync to server?

thanks!
angular

#2

getPendingDocumentIDs is not supported in 2.1. Please refer to this discussion for details:

In upcoming cblite 2.5 release, you can use DocumentReplicationChange notification to keep tracking replicated documents. For prior to cblite 2.5 release, if continues replication is set to true, you can use:

replicator.config.continuous && change.status.activity == kCBLReplicatorIdle
&& change.status.progress.completed == change.status.progress.total

#3

HI @eunice.huang,
Thanks! that great!

angular