In the sync config json file, guest is disabled with sync function:
function (doc, oldDoc) {
channel(doc.channels);
}
Then in iOS, Sync trigger is in the AppDelegate with channel.
self.pullData.authenticator = CBLAuthenticator.basicAuthenticator(withName: “usernameHere”, password: “passwordHere”)
self.pull.channels = [“channelName”]
In the database, there’s one document which channel is “channelName”.
I expect to pull this document.
No Pull Error, but nothing is being pulled.
I enabled the following logs:
Sync
ChangeTracker
RemoteRequest
Relevant responses are:
Successfully logged in!
No local checkpoint; not getting remote one
So, in and of itself, No local checkpoint; not getting remote one isn’t anything to be worried about. It just means that this Couchbase Lite client hasn’t replicated from this this Sync Gateway before, so there’s no checkpoint to start from.
Does your user usernameHere have access to that channel? I can see that you’re requesting only that channel, but if you don’t have access to it you won’t be able to get it.
Thank you for the response @JFlath . How can I make sure that usernameHere have access to a channel? I already tried adding user via curl:
curl -X PUT ‘localhost:4985/sync_gateway/_user/usernameHere’ -d ‘{“name”: “usernameHere”, “password”: “passwordHere”}’