Q: about getPendingDocumentIDs to fetch all document sync complete

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