I’ve run into what seems to be a chicken and egg scenario regarding stopping replicators in Couchbase Lite Swift / iOS.
The documentation indicates we should remove replication change listeners before stopping a replicator. However, it also indicates stopping a replicator is an asynchronous action and we should wait for the replicator to change to the stopped state before taking further actions, such as deleting the database. What is the recommended method to do this in the absence of, well, using a change listener on the replicator to detect when it entered the stopped state?
Thanks,
- Scott