I’m using Couchbase Lite .NET 1.2. SystemSQLite storage. Sync Gateway 1.1 with walrus. Observed behavior with Xamarin.Android, but iOS will matter as well.
At startup, my app starts continuous push and pull replications.
Later, if the user decides to login (with Facebook), I want to change the Replications to include those auth credentials. That code looks something like this:
var auth = Couchbase.Lite.Auth.AuthenticatorFactory.CreateFacebookAuthenticator (_facebookToken); _pull.Authenticator = auth; _push.Authenticator = auth;
after which I do:
_pull.Restart (); _push.Restart ();
but in the application output I see:
Replication: Not starting becuse identical puller already exists Replication: Not starting becuse identical pusher already exists
And after that, the replications have stopped working.
I’ve tried using Stop followed by Start, instead of Restart. Similar results.
I expect the need to make other kinds of changes to the Replication as well. For example, my app will sometimes realize it needs to add a channel.
Am I doing something wrong? Should I be discarding the Replication objects and creating new ones? Or simply adding new ones to the ones already there?
Thanks in advance.