I am building chat application where mobile app user keeps data on his device. We try to sync only user-related data from the server to client( couchbase server to couchbase mobile ). But from mobile using swift all Bucket is stored from server to mobile internal db. My sync json is
{
"interface": "192.168.0.68:4984",
“adminInterface”: “192.168.0.68:4985”,
“pretty”: true,
"log": ["*"],
"databases": {
"db": {
"server": "http://192.168.0.68:8091",
"bucket": "travel-sample",
"username":"himanshu",
"password":"123456",
"users": {
"himanshu": {
"password": "123456",
"admin_channels": [
"*"
]
}
},
"sync":`
function (doc) {
channel (doc.channels);
}
`
}
}
}
It is possible that server send only related data to mobile for sync.