ios - Sync with Couchbase Lite through Couchbase Sync Gateway doesn’t see any documents (Channel issue?) -
i’m trying sync couchbase bucket server ios app using couchbase sync gateway , couchbase lite ios.
so far i’m working "beer-sample" example bucket comes couchbase.
on ubuntu 12.04 lts vm, couchbase sync gateway started config file:
{ "interface":":4984", "admininterface":":4985", "log":["rest"], "databases":{ "sync_gateway":{ "server":"http://localhost:8091", "bucket":"beer-sample", "sync":`function(doc) {channel(["public"]);}`, "users": { "guest": {"disabled": false, "admin_channels": ["public"]} } } } }
my intention running without worrying authentication first, therefore guest user.
i’ve modified example make sure channel assignment not dependent on documents, because sample bucket doesn’t have channel assignment:
"sync":`function(doc) {channel(["public"]);}`,
i included code https://github.com/couchbaselabs/todolite-ios/blob/master/todolite7/cblsyncmanager.m own example project, , after bit of trying ios can connect connector.
the nslog in line 168 gives me output:
[1026:60b] syncmgr: active=0; status=1; 0/0; (null) [1026:60b] syncmgr: active=1; status=3; 0/0; (null) [1026:60b] syncmgr: active=0; status=2; 0/0; (null)
…and interpretation of syncing (of 0 documents) working successfully.
why couchbase sync gateway not report documents couchbase lite? i’m missing something. suspect channels not setup correctly.
any appreciated , if answer solves problem, accept it.
as re-posted our communities portal, close out issue here re-post in response , continued questions should on our communities portal.
based on description of issue , configuration, still need configure sync gateway let know there existing couchbase server bucket needs sync from.
this recent feature add after our beta 2; we're working on documentation, available interim here: https://github.com/couchbase/sync_gateway/wiki/bucket-shadowing
continued thread can found here: http://www.couchbase.com/communities/q-and-a/sync-couchbase-lite-through-couchbase-sync-gateway-doesn%e2%80%99t-see-any-documents-channel-issue
Comments
Post a Comment