I created a simple app to clone an existing database / data bucket from a couchbase to an ios device based on http://developer.couchbase.com/mobile/develop/guides/couchbase-lite/native-api/database/index.html
The app creates an empty database and then tries to pull the database from the server. It works with the “grocery-sync” bucket but not with a different database with some documents inside.
void) replicationChanged: (NSNotification*)n is only called a few times and should be called (way) more often. There seem to be no changes in the bucket (pull.changesCount is 0).
Hm, the problem seems to be that the documents are not assigned to a channel (I created the testbucket from a java app directly without sync server)?
And the sync function uses ‘channel(doc.channels)’ for database “test”.
Is this the problem? Then how do I assign (existing) documents of a bucket to a channel? I assume this can be done in a view? Or can I assign a channel (property) then the documents are introduced into couchbase (via Java Couchbase Client 2.02 API)?