In the CBL Swift and Objective-C SDKs, the token returned by Replicator.addDocumentReplicationListener
fails to remove the listener when calling ListenerToken.remove
.
If you change this line of ReplicatorTest.testDocumentReplicationEvent
from the deprecated replicator.removeChangeListener(withToken: token)
to token.remove()
, the test fails to remove the listener.
It also doesn’t work for removing Replicator.addChangeListener
either.