In iOS and Android native CBL modules there are corresponding methods for getting notified when one-shot synchronisation with SG is done.
But I can’t figure out what is reliable way to get the same in RN CBL
I think of using server.get_active_tasks like this:
return cbl.server.get_active_tasks()
.then((task)=> {
if (task.status === 200) {
if (task.data === '[]') {
// here we should know that sync is completed
}
)
but not sure if it’s what I need to ensure that sync is really done for that particular client.
Thank you for any suggestions.